summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSebastian Schmelzer2010-09-15 17:15:05 +0200
committerSebastian Schmelzer2010-09-15 17:15:05 +0200
commit17a1ef3b9a97e0212a86170daead75b3db6b1695 (patch)
tree69f3b9c43c905b617d7a68d06294473d4e5cc44b /tools
parentfully working installer ;) (diff)
downloadcore-17a1ef3b9a97e0212a86170daead75b3db6b1695.tar.gz
core-17a1ef3b9a97e0212a86170daead75b3db6b1695.tar.xz
core-17a1ef3b9a97e0212a86170daead75b3db6b1695.zip
minor bugfixes
Diffstat (limited to 'tools')
-rwxr-xr-xtools/installer21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/installer b/tools/installer
index 8b29aff4..9b42f862 100755
--- a/tools/installer
+++ b/tools/installer
@@ -17,6 +17,7 @@ DISTRO=$(lsb_release -i| sed 's/^[^:]*:\t//' | tr '[:upper:]' '[:lower:]')
[ -z $SLX_INSTALL_LOG ] && SLX_INSTALL_LOG=install.log
PREPARE_INSTALL_TARGET="./_install/"
+INSTALL_HOME=$(pwd)
@@ -218,7 +219,10 @@ prepare_install()
| tar -xp -C ${PREPARE_INSTALL_TARGET}${SLX_CONFIG_PATH}
### link slx binarires ###
- ln -sf ${SLX_BASE_PATH}/bin/slx* ${PREPARE_INSTALL_TARGET}${USR_BIN_PATH}/
+ for f in $(ls -1 $PREPARE_INSTALL_TARGET/$SLX_BASE_PATH/bin )
+ do
+ ln -sf $SLX_BASE_PATH/bin/$(basename $f) ${PREPARE_INSTALL_TARGET}${USR_BIN_PATH}/
+ done
### deprecated.. ###
ln -sf ${SLX_BASE_PATH}/share/uclib-rootfs/lib/ld-uClibc.so.0 \
@@ -230,6 +234,8 @@ prepare_install()
make_install_tarball()
{
+ cd $INSTALL_HOME
+ [ -d $PREPARE_INSTALL_TARGET ] || prepare_install
local COMPRESSION=$1
local ALTERNATIVE_PREFIX=$2
[ "x$COMPRESSION" = "x" ] && \
@@ -249,6 +255,7 @@ make_install_tarball()
sh -c "$CMD"
cd - 2>&1 >/dev/null
fi
+ rm -rf $PREPARE_INSTALL_TARGET
COMPRESSION_KEEP_ORIG="-k"
[ "x$COMPRESSION" = "xgzip" ] && COMPRESSION_KEEP_ORIG=""
[ "x$COMPRESSION" = "x" ] || $COMPRESSION -f $COMPRESSION_KEEP_ORIG $VERSIONSTRING.tar
@@ -290,9 +297,8 @@ do_install()
echo " you need to be root"
exit 1
fi
- make_install_tarball >>${SLX_INSTALL_LOG} 2>&1
+ make_install_tarball >>${SLX_INSTALL_LOG} 2>&1
VERSIONSTRING="openslx-$(git_version)"
- INSTALL_HOME=$(pwd)
cd ${SLX_BUILD_PATH}/; tar xf $INSTALL_HOME/$VERSIONSTRING.tar
cd $INSTALL_HOME
echo -e " [${LightGreen}ok${NC}]"
@@ -408,7 +414,6 @@ build_dpkg_package()
export SLX_DEPBUILD_PATH=/tmp/slx-dep-$$
mkdir -p $SLX_DEPBUILD_PATH
- INSTALL_HOME=$(pwd)
VERSIONSTRING="openslx-$(git_version)"
cd $SLX_DEPBUILD_PATH
@@ -450,7 +455,6 @@ build_dpkg_package()
build_rpm_package()
{
- INSTALL_HOME=$(pwd)
VERSIONSTRING="openslx-$(git_version)"
OPENSLX_VERSION=$(git describe | sed -e 's/-.*$//' -e 's/^v//')
@@ -504,7 +508,7 @@ build_rpm_package()
echo -e " [${LightGreen}ok${NC}]"
mkdir -p $INSTALL_HOME/pkgs/
- echo "find $SLX_RPMBUILD_PATH/RPMS/ -iname *.rpm -exec cp {} $INSTALL_HOME/pkgs/ \;"
+ #echo "find $SLX_RPMBUILD_PATH/RPMS/ -iname *.rpm -exec cp {} $INSTALL_HOME/pkgs/ \;"
sh -c "find $SLX_RPMBUILD_PATH/RPMS/ -iname \"*.rpm\" -exec cp {} $INSTALL_HOME/pkgs/ \;"
rm -rf $SLX_RPMBUILD_PATH
@@ -535,7 +539,6 @@ cmd_usage()
cmd_plain_install()
{
echo "running plain install:"
- prepare_install
do_install
}
@@ -548,7 +551,6 @@ cmd_install()
check_perl_db
check_helper_apps
check_upgrade
- prepare_install
do_install
post_install
}
@@ -556,14 +558,12 @@ cmd_install()
cmd_build_rpm()
{
echo "creating rpm package(s)"
- prepare_install
build_rpm_package
}
cmd_build_deb()
{
echo "creating deb package"
- prepare_install
build_dpkg_package
}
@@ -571,7 +571,6 @@ cmd_build_deb()
cmd_build_tarball()
{
echo "creating deb package"
- prepare_install
make_install_tarball bzip2
mkdir -p pkgs/
cp openslx*.tar.bz2 pkgs/