summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-11-09 11:13:45 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2008-11-09 11:13:45 +0100
commit9928edd25ecb1b480f8fb3fbd7bce207f86d3424 (patch)
tree03d4ab37e0a703b18a10b2f5d8ca9d49405b05dc /bin
parent757a18e394063ada618df4714eb8fdd1f7131010 (diff)
bin/pkg: Use parameter expansion for the default values
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/pkg b/bin/pkg
index 946fd01..cc07702 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -61,11 +61,11 @@ if [[ -f $HOME/.pkg.conf ]] {
}
# Default values... or not
-[[ -n $PDIR ]] || PDIR="$HOME/packages"
[[ -n $PKG_ROOT ]] || die "No PKG_ROOT specified. Please edit ~/.pkg.conf\n"
-[[ -n $CL_OPTIONS ]] || CL_OPTIONS=(-q)
-[[ -n $SILENT ]] || SILENT=0
-[[ -n $AUTOUPDATE ]] || AUTOUPDATE=1
+: ${PDIR:="$HOME/packages"}
+: ${CL_OPTIONS:=-q}
+: ${SILENT=0}
+: ${AUTOUPDATE=1}
export PDIR
export PKG_ROOT