diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-11-07 14:01:30 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-11-07 14:01:30 +0000 |
commit | 1bd8c15d882fc0420de8956664eefbb2e0d54f42 (patch) | |
tree | 4318149985fd6107057af3af5c8d6feffbdc5e05 /add-shell | |
parent | 245d387c737ba4be367c08c022a39efe513f2059 (diff) | |
download | rpm-helper-1bd8c15d882fc0420de8956664eefbb2e0d54f42.tar rpm-helper-1bd8c15d882fc0420de8956664eefbb2e0d54f42.tar.gz rpm-helper-1bd8c15d882fc0420de8956664eefbb2e0d54f42.tar.bz2 rpm-helper-1bd8c15d882fc0420de8956664eefbb2e0d54f42.tar.xz rpm-helper-1bd8c15d882fc0420de8956664eefbb2e0d54f42.zip |
keep /etc/shells sorted, thus enabling to ensure uniq entries
Diffstat (limited to 'add-shell')
-rwxr-xr-x | add-shell | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -26,5 +26,8 @@ if [ ! -f $CFG_FILE ]; then > $CFG_FILE fi -grep -qv "^$shl$" $CFG_FILE && echo $shl >> $CFG_FILE +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 + exit 0
\ No newline at end of file |