-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INTERNAL: Move a libevent dependency
- Loading branch information
1 parent
4b5e3b8
commit 73ebda3
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
trap "stop_build" ERR | ||
|
||
stop_build() { | ||
printf "\nError has occurred. $0 has failed\n" | ||
printf "Check ./build.log\n" | ||
exit -1 | ||
} | ||
|
||
libevent_file=$(find . -name "libevent*.tar.gz") | ||
libevent_version=$(sed -e 's/..libevent-\(.*\)\.tar\.gz/\1/' <<< $libevent_file) | ||
install_path=$1 | ||
|
||
echo "[BUILD LOG FILE]" > build.log | ||
|
||
echo "---------------------------------------" | ||
echo "ARCUS MEMCACHED DEPENDENCY BUILD: START" | ||
echo "---------------------------------------" | ||
echo "LOG PATH : $PWD" | ||
echo "INSTALL PATH : $install_path" | ||
echo "LIBEVENT VERSION : $libevent_version" | ||
echo "---------------------------------------" | ||
if test -d ./libevent-$libevent_version ; then | ||
rm -rf libevent-$libevent_version | ||
fi | ||
printf "[libevent decompression] .. START" | ||
tar -xvf libevent-$libevent_version.tar.gz >> ./build.log 2>&1 | ||
printf "\r[libevent decompression] .. SUCCEED\n" | ||
pushd libevent-$libevent_version >> ./build.log | ||
printf "[libevent configure] .. START" | ||
./configure --prefix=$install_path --disable-openssl >> ../build.log 2>&1 | ||
printf "\r[libevent configure] .. SUCCEED\n" | ||
printf "[libevent make] .. START" | ||
make >> ../build.log 2>&1 | ||
printf "\r[libevent make] .. SUCCEED\n" | ||
printf "[libevent make install] .. START" | ||
make install >> ../build.log 2>&1 | ||
printf "\r[libevent make install] .. SUCCEED\n" | ||
popd >> ./build.log | ||
rm -rf libevent-$libevent_version >> ./build.log 2>&1 | ||
|
||
echo "---------------------------------------" | ||
echo "ARCUS MEMCACHED DEPENDENCY BUILD: END" | ||
echo "---------------------------------------" | ||
|
Binary file not shown.