summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2012-09-28 15:50:24 +0200
committerJonathan Bauer2012-09-28 15:50:24 +0200
commite5a0017ca712cbff7e6d699a547e97a822c19e35 (patch)
treea9cd9de9d746ba513264d1df8dbcb3949dc64207
parentrenamed.... (diff)
downloadtm-scripts-e5a0017ca712cbff7e6d699a547e97a822c19e35.tar.gz
tm-scripts-e5a0017ca712cbff7e6d699a547e97a822c19e35.tar.xz
tm-scripts-e5a0017ca712cbff7e6d699a547e97a822c19e35.zip
minor
-rw-r--r--remote/setup-tools.sh44
1 files changed, 6 insertions, 38 deletions
diff --git a/remote/setup-tools.sh b/remote/setup-tools.sh
index a2c63702..da42ad0b 100644
--- a/remote/setup-tools.sh
+++ b/remote/setup-tools.sh
@@ -17,12 +17,12 @@ elif [ "x$(whoami)" != "xroot" ]; then
fi
#Create tools directory if not exists
-TOOL_DIR=$ROOT_DIR/openslx/tools
-INIT_DIR=$ROOT_DIR/openslx/initramfs
+TOOL_DIR=$ROOT_DIR/tools
+INIT_DIR=$ROOT_DIR/initramfs
-read_config ()
+read_config ()
{
- TOOL_CONFIG=$ROOT_DIR/config/setup-$tool.conf
+ TOOL_CONFIG=$TOOL_DIR/$TOOL/$TOOL.conf
if [ ! -e $TOOL_CONFIG ]; then
echo "ERROR: Config for specified tool not found."
@@ -32,7 +32,7 @@ read_config ()
. $TOOL_CONFIG
}
-setup_git ()
+setup_git ()
{
if [ ! -z "$GIT" ]; then
GIT_BIN=$(which git)
@@ -40,38 +40,6 @@ setup_git ()
fi
}
-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
- wget $URL
- tar xJf $VERSION.tar.xz
- rm $VERSION.tar.xz
- else
- echo "Could not fetch source for $TOOL. No location specified."
- fi
-}
-
-install_dependencies()
-{
- apt-get install --force-yes $DEPS
-}
-
-build ()
-{
- cd $VERSION
- ./configure --disable-manpages
- make
- mkdir -p $TMP_DIR
- DESTDIR=$DESTDIR make install
-}
-
copyfileswithdependencies () {
cd $VERSION/tmp
COPYFILES_LIST="copyfiles.list"
@@ -97,7 +65,7 @@ main () {
setup_git
while (( "$#" )); do
- tool=$1
+ TOOL=$1
read_config
install_dependencies
fetch_source