diff options
author | Frederic Lepied <flepied@mandriva.com> | 2002-12-22 21:39:36 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2002-12-22 21:39:36 +0000 |
commit | 6076e73d4dd62a7904bb5559de14f77c7f03711d (patch) | |
tree | c29439d6ff56f3c9729ca884d7dc9ce8e8aaba2d /add-shell | |
parent | 1bd8c15d882fc0420de8956664eefbb2e0d54f42 (diff) | |
download | rpm-helper-6076e73d4dd62a7904bb5559de14f77c7f03711d.tar rpm-helper-6076e73d4dd62a7904bb5559de14f77c7f03711d.tar.gz rpm-helper-6076e73d4dd62a7904bb5559de14f77c7f03711d.tar.bz2 rpm-helper-6076e73d4dd62a7904bb5559de14f77c7f03711d.tar.xz rpm-helper-6076e73d4dd62a7904bb5559de14f77c7f03711d.zip |
corrected bad grep use
Diffstat (limited to 'add-shell')
-rwxr-xr-x | add-shell | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -26,8 +26,9 @@ if [ ! -f $CFG_FILE ]; then > $CFG_FILE fi -grep -qv "^$shl$" $CFG_FILE && \ - (cat /etc/shells;echo /bin/TSH) | sort | uniq > $CFG_FILE.new -[[ -f $CFG_FILE.new ]] && mv -f $CFG_FILE.new $CFG_FILE +if ! grep -q "^$shl$" $CFG_FILE; then + (cat $CFG_FILE; echo "$shl") | sort | uniq > $CFG_FILE.new + mv -f $CFG_FILE.new $CFG_FILE +fi -exit 0
\ No newline at end of file +exit 0 |