summaryrefslogtreecommitdiffstats
path: root/tools/installer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/installer')
-rwxr-xr-xtools/installer19
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/installer b/tools/installer
index 6989f7e9..9345c31b 100755
--- a/tools/installer
+++ b/tools/installer
@@ -28,7 +28,7 @@ git_version()
GITVERSION=`git describe`
GITMODIFIED=`(git status | grep "modified:\|added:\|deleted:" -q) && echo "-M"`
echo $GITVERSION$GITMODIFIED
- echo $GITVERSION > VERSION
+ [ -w VERSION -o ! -e VERSION ] && echo $GITVERSION > VERSION
else
cat VERSION
fi
@@ -513,6 +513,20 @@ build_rpm_package()
rm -rf $SLX_RPMBUILD_PATH
}
+
+cleanup_tmpfiles()
+{
+ rm -f openslx-*.tar
+ rm -rf _install
+}
+
+check_permissions()
+{
+ if [ ! "x$(whoami)" = "xroot" ]; then
+ echo "You need to be root to run installer.."
+ exit 1
+ fi
+}
clean()
{
@@ -596,6 +610,7 @@ cmd_mrproper()
print_banner
+check_permissions
versions_update
@@ -629,6 +644,8 @@ case "$1" in
;;
esac
+cleanup_tmpfiles
+
#make_install_tarball
#make_install_tarball gzip
#make_install_tarball bzip2