Commit Diff
Diff:
be29f5568839f3ac75c3e955344a25942af3df54
b3c663cae2f4de0f7c184648b14630f2d881dd32
Commit:
b3c663cae2f4de0f7c184648b14630f2d881dd32
Tree:
54510b9011d16ff91e42f7851b5861969faa102c
Author:
Fred. Galusik <f@galusik.xyz>
Committer:
Fred. Galusik <f@galusik.xyz>
Date:
Sun May 17 14:59:48 2015 UTC
Message:
the user can export the MIRROR var too
blob - fd8e285fc5c5e28a4c8a01f62540112720667a4a
blob + 4e8f30fc6b2cc46e0193a5c204bf32a9a51aebeb
--- snaps
+++ snaps
@@ -43,9 +43,13 @@
VERSION=0.1
MIRRORSOURCE=/etc/pkg.conf
-MIRROR=$(sed -e 's/installpath = //' -e 's/packages\///' $MIRRORSOURCE)
-RL=57
+if [ ! $MIRROR ]; then
+ MIRROR=$(sed -e 's/installpath = //' -e 's/packages\///' $MIRRORSOURCE)
+fi
+
+RL=57 # signify var
+
BSDRD=bsd.rd
SHAF=SHA256
SIGF=SHA256.sig
@@ -55,7 +59,7 @@ GET='ftp -m -C'
REBOOT='/sbin/reboot'
LOGF=/var/log/snaps.log
-NOW='date \"+ %Y-%m-%d %R\"'
+NOW=$(date "+ %Y-%m-%d %R")
###
###
@@ -65,7 +69,6 @@ usage() {
echo "Usage: ${0##*/} [-gGlh]" >&2 && exit 1
}
-
s_root() {
if [[ $(id -u) != "0" ]]; then
echo "==> WARNING: You need to be root to do this" 1>&2
Frédéric Galusik