diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-02 17:51:57 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-02 17:51:57 +0200 |
commit | 1048d5520ff30a561c2304b9b5cb433a5d1dd2fd (patch) | |
tree | 89cbdc292ed974e95d73358677f0dbda6d925bd7 | |
parent | bda576f0734a00bd8d39cb63c27b43fa38344567 (diff) |
bin/pkg: Allow value override from shell environment, too
-rwxr-xr-x | bin/pkg | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,14 +1,6 @@ #!/usr/bin/env zsh # pkg - /home package manager and zsh playground -PDIR="$HOME/packages" -PKG_ROOT="ssh://derf.homelinux.org/~/var/packages_root" -CL_OPTIONS=(-q) -info=$'\e[0;36m' -error=$'\e[0;31m' -reset=$'\e[0m' - - ## ## Internal functions for displaying stuff ## @@ -48,6 +40,14 @@ if [[ -f $HOME/.pkg.conf ]] { . $HOME/.pkg.conf } +# Default values +[[ -n $PDIR ]] || PDIR="$HOME/packages" +[[ -n $PKG_ROOT ]] || PKG_ROOT="ssh://derf.homelinux.org/~/var/packages_root" +[[ -n $CL_OPTIONS ]] || CL_OPTIONS=(-q) +info=$'\e[0;36m' +error=$'\e[0;31m' +reset=$'\e[0m' + export PDIR export PKG_ROOT |