From e2fea0c673837aa9011eaa41dbd61814ce1f51cb Mon Sep 17 00:00:00 2001 From: Michael Neves Date: Fri, 28 Sep 2012 17:39:28 +0200 Subject: systemd build script --- remote/tools/systemd/build.systemd | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/remote/tools/systemd/build.systemd b/remote/tools/systemd/build.systemd index f8616da2..0a899488 100644 --- a/remote/tools/systemd/build.systemd +++ b/remote/tools/systemd/build.systemd @@ -2,20 +2,13 @@ fetch_source () { -# if [ -d $VERSION/ ]; then -# read -p "$VERSION already exists and would be overwritten, continue anyway (y/n)?" -# [ "$REPLY" == "n" ] && exit 1 -# fi - - if [ ! -z "$GIT" ]; then - git clone $GIT $VERSION - elif [ ! -z "$URL" ]; then + if [ ! -e .fetched_source ]; then + [ ! -d src ] && mkdir src wget $URL - tar xJf $VERSION.tar.xz + tar xJf $VERSION.tar.xz -C src/ rm $VERSION.tar.xz - else - echo "Could not fetch source for $TOOL. No location specified." - fi + touch .fetched_source + fi } install_dependencies() @@ -25,9 +18,13 @@ install_dependencies() build () { - cd $VERSION - ./configure --disable-manpages - make - mkdir -p $TMP_DIR - DESTDIR=$DESTDIR make install + if [ ! -e .built ]; then + cd src/$VERSION + ./configure --disable-manpages + make + [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build + DESTDIR=$TOOL_DIR/$TOOL/build make install + cd - + touch .built + fi } -- cgit v1.2.3-55-g7522