diff options
| author | Michael Neves | 2012-09-28 17:39:28 +0200 |
|---|---|---|
| committer | Michael Neves | 2012-09-28 17:39:28 +0200 |
| commit | e2fea0c673837aa9011eaa41dbd61814ce1f51cb (patch) | |
| tree | 48acb6bb6aee121c80fd3c5137514114ebca369e | |
| parent | Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-e2fea0c673837aa9011eaa41dbd61814ce1f51cb.tar.gz tm-scripts-e2fea0c673837aa9011eaa41dbd61814ce1f51cb.tar.xz tm-scripts-e2fea0c673837aa9011eaa41dbd61814ce1f51cb.zip | |
systemd build script
| -rw-r--r-- | remote/tools/systemd/build.systemd | 31 |
1 files 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 } |
