X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=threegates.git;a=blobdiff_plain;f=bin%2Fthreegates_builder.sh;h=cbfa7e0a0b7c0193ed811cbb874a05fe077ba673;hp=55bfd0deab33c963b23508a115901089218c9bd3;hb=HEAD;hpb=c0cd6168f319da85e05555d534ad157bafcf8a7d diff --git a/bin/threegates_builder.sh b/bin/threegates_builder.sh index 55bfd0d..cbfa7e0 100755 --- a/bin/threegates_builder.sh +++ b/bin/threegates_builder.sh @@ -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 @@ -42,9 +45,9 @@ if ! grep -q $GROUPNAME /etc/group ; then fi $EXCMD_FS mkdir -p ${THREEGATES_BASE}/usr/lib/threegates/bin -$EXCMD_FS cp raw/root/usr/lib/threegates/bin/crl-manager.py ${THREEGATES_BASE}/usr/lib/threegates/bin -$EXCMD_SY chown root.root ${THREEGATES_BASE}/usr/lib/threegates/bin/crl-manager.py -$EXCMD_FS chmod 744 ${THREEGATES_BASE}/usr/lib/threegates/bin/crl-manager.py +$EXCMD_FS cp raw/root/usr/bin/crl-manager.py ${THREEGATES_BASE}/usr/bin +$EXCMD_SY chown root.root ${THREEGATES_BASE}/usr/bin/crl-manager.py +$EXCMD_FS chmod 744 ${THREEGATES_BASE}/usr/bin/crl-manager.py $EXCMD_FS mkdir -p ${THREEGATES_BASE}/var/lib/threegates @@ -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