SVN: toys/tools/cleanbuild/cleanbuild

sparky sparky at pld-linux.org
Tue Feb 23 15:21:18 CET 2010


Author: sparky
Date: Tue Feb 23 15:21:18 2010
New Revision: 11166

Modified:
   toys/tools/cleanbuild/cleanbuild
Log:
- fix .cleanbuildrc
- protect against USER not defined


Modified: toys/tools/cleanbuild/cleanbuild
==============================================================================
--- toys/tools/cleanbuild/cleanbuild	(original)
+++ toys/tools/cleanbuild/cleanbuild	Tue Feb 23 15:21:18 2010
@@ -1,6 +1,5 @@
 #!/usr/bin/sudo /bin/sh
 
-USER="sparky"
 RPMS_FROM="$HOME/rpm/cleanRPMS.repo"
 DEST="th"
 SRC="-n th-x86_64-test"
@@ -9,7 +8,10 @@
 IGNORE=""
 NODEBUG=true
 
-[ -r .cleanbuildrc ] && . .cleanbuildrc
+[ -r .cleanbuildrc ] && . ./.cleanbuildrc
+
+[ -z "$USER" ] && echo "USER not defined" && exit 1
+[ "$USER" == "root" ] && echo "USER must not be root" && exit 1
 
 export LC_ALL=C
 unset LANGUAGE


More information about the pld-cvs-commit mailing list