fakeroot usage added to avoid root privileges requirements. master 0.0.1
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 23 Oct 2011 16:57:42 +0000 (18:57 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 23 Oct 2011 16:57:42 +0000 (18:57 +0200)
README.txt
bin/threegates_builder.sh

index 2762d12..11f8f2f 100644 (file)
@@ -7,8 +7,13 @@ of related Certification Revocation Lists (CRL).
 
 === HOWTO ===
 
-- as user "root" run ./bin/threegates_builder.sh 
+- 
+  as user "root" run ./bin/threegates_builder.sh 
   in "out" directory you found a tree that you can tar and explode in / directory
+OR
+  run fakeroot ./bin/threegates_builder.sh -t
+  you will find an archive threegates_out.tgz that you can explode in / directory
+
 
 - add apache user to "threegates" group
 
index bf3535e..cbfa7e0 100755 (executable)
@@ -7,6 +7,7 @@ usage () {
     echo "  -dd dry totally run (local and system wide)"
     echo "  -d  dry run system-related commands"
     echo "  -p  prefix path for the installation (default is ./out)"
+    echo "  -t  produce a tar archive of the output (use it with fakeroot)"
     exit $2
 }
 
@@ -19,12 +20,14 @@ DRYRUN=0
 EXCMD_FS=""
 EXCMD_SY=""
 THREEGATES_BASE="./out"
+WITH_ARCHIVE=0
 
 while [ $# -gt 0 ]; do
     case $1 in
         -dd) DRYRUN=2 ;;
         -d)  DRYRUN=1 ;;
         -p)  THREEGATES_BASE="$2" ; shift ;;
+        -t)  WITH_ARCHIVE=1 ;;
         *)   usage $0  ;;
     esac
     shift
@@ -67,4 +70,9 @@ $EXCMD_SY chgrp $GROUPNAME ${THREEGATES_BASE}/var/lib/threegates/crlurinew
 export THREEGATES_CA_BASE="${THREEGATES_BASE}/var/lib/threegates/ca"
 $EXCMD_FS ./bin/certs_extractor.sh
 
-exit 0
\ No newline at end of file
+if [ $WITH_ARCHIVE -eq 1 ]; then
+    cd $THREEGATES_BASE
+    tar zcvf ../threegates_out.tgz *
+fi
+
+exit 0