summaryrefslogtreecommitdiffstats
path: root/remote/tools
diff options
context:
space:
mode:
Diffstat (limited to 'remote/tools')
-rw-r--r--remote/tools/systemd/build.systemd31
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
}