summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSebastian Schmelzer2010-09-14 18:25:02 +0200
committerSebastian Schmelzer2010-09-14 18:25:02 +0200
commit43060a928b8da46cba6d9c9f46c83aa1f65f81a9 (patch)
treebb06b9ab12cb9347ce663ed8b6c36305a18ca36e /tools
parentMerge branch 'master' of git+ssh://git.openslx.org/openslx/core (diff)
downloadcore-43060a928b8da46cba6d9c9f46c83aa1f65f81a9.tar.gz
core-43060a928b8da46cba6d9c9f46c83aa1f65f81a9.tar.xz
core-43060a928b8da46cba6d9c9f46c83aa1f65f81a9.zip
makefile uses new installer now
Diffstat (limited to 'tools')
-rwxr-xr-xtools/installer66
1 files changed, 58 insertions, 8 deletions
diff --git a/tools/installer b/tools/installer
index 80a380ad..998bb97d 100755
--- a/tools/installer
+++ b/tools/installer
@@ -262,12 +262,13 @@ do_install()
exit 1
fi
check_upgrade
- make_install_tarball
+ make_install_tarball >>${SLX_INSTALL_LOG} 2>&1
VERSIONSTRING="openslx-$(git_version)"
check_upgrade
INSTALL_HOME=$(pwd)
cd ${SLX_BUILD_PATH}/; tar xf $INSTALL_HOME/$VERSIONSTRING.tar
cd $INSTALL_HOME
+ echo -e " [${LightGreen}ok${NC}]"
}
uninstall()
@@ -284,6 +285,14 @@ uninstall()
mrproper()
{
+ echo -e "${LightRed}*warning*${NC} This will remove all cloned/exported OpenSLX systems from your machine!"
+ echo -n "Press <Ctrl>-C to abort.. "
+ for i in 4 3 2 1
+ do
+ echo -n "$i.."
+ sleep 1
+ done
+ echo "0"
echo -n " * Wiping all!"
rm -rf ${SLX_BASE_PATH}
rm -rf ${SLX_CONFIG_PATH}
@@ -417,7 +426,7 @@ build_dpkg_package()
echo -e " [${LightGreen}ok${NC}]"
mkdir -p $INSTALL_HOME/pkgs/
- sh -c "find $SLX_DEPBUILD_PATH/ -iname \"*.deb\" -exec cp {} $INSTALL_HOME/pkgs/ \;"
+ cp $SLX_DEPBUILD_PATH.deb $INSTALL_HOME/pkgs/$VERSIONSTRING.deb
cd $INSTALL_HOME
rm -rf $SLX_DEPBUILD_PATH
}
@@ -484,23 +493,27 @@ build_rpm_package()
rm -rf $SLX_RPMBUILD_PATH
}
-
+
clean()
{
echo -n " * Cleanup OpenSLX source directory"
for file in ${SLX_INSTALL_LOG} openslx-*.tar.bz2; do
rm -f ${file}
done
+ rm -rf _install
echo -e " [${LightGreen}ok${NC}]"
}
+
cmd_usage()
{
echo "Usage: ..."
echo " plain-install"
echo " install"
- echo " build_rpm"
- echo " build_deb"
+ echo " build-rpm"
+ echo " build-deb"
+ echo " clean"
+ echo " mrproper"
}
cmd_plain_install()
@@ -527,13 +540,38 @@ cmd_build_rpm()
build_rpm_package
}
-cmd_build_dep()
+cmd_build_deb()
{
echo "creating deb package"
build_dpkg_package
}
+cmd_build_tarball()
+{
+ echo "creating deb package"
+ make_install_tarball bzip2
+}
+
+cmd_clean()
+{
+ echo "Cleanup source directory"
+ clean
+}
+
+cmd_uninstall()
+{
+ echo "normal uninstall"
+ uninstall
+}
+
+cmd_mrproper()
+{
+ echo "Remove all OpenSLX files from the system"
+ mrproper
+}
+
+
case "$1" in
"plain-install")
cmd_plain_install
@@ -544,8 +582,20 @@ case "$1" in
"build-rpm")
cmd_build_rpm
;;
- "build-dep")
- cmd_build_dep
+ "build-deb")
+ cmd_build_deb
+ ;;
+ "build-tarball")
+ cmd_build_tarball
+ ;;
+ "uninstall")
+ cmd_uninstall
+ ;;
+ "clean")
+ cmd_clean
+ ;;
+ "mrproper")
+ cmd_mrproper
;;
*)
cmd_usage