diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-27 20:10:09 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-27 20:10:09 +0200 |
commit | 58e5b1026c3abf39bf8fd721b1043c6692f8c327 (patch) | |
tree | b382ba0ef217c995f2a0a3ff5c11f5961b990873 | |
parent | ba5c6a3350252f9498e93d7883a36c167e3ef763 (diff) |
bin/pkg: check whether sed works properly
-rwxr-xr-x | bin/pkg | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -11,7 +11,7 @@ VCS_UPDATE="pull" VCS_UPDATE_OPTIONS="--update" CL_OPTIONS="-q" info=$'\e[0;36m' -error=$'\e[1;31m' +error=$'\e[0;31m' reset=$'\e[0m' info () { @@ -27,6 +27,13 @@ die () { exit 100 } +check_sed () { + QUUX=$(echo foox | sed -r 's/^fo{2}(.)$/quu\1/') + if ([ ! $QUUX = 'quux' ]) { + warn "sed is not working properly. This may produce unexpected behaviour.\n" + } +} + if ([ -f $HOME/.pkg.conf ]) { . $HOME/.pkg.conf } @@ -164,6 +171,8 @@ pkg_status_wrapper () { } } +check_sed + case "$1" in add) pkg_add "$2" ;; changeroot) pkg_changesrc "$2" ;; |