aboutsummaryrefslogtreecommitdiffstats
path: root/add-shell
diff options
context:
space:
mode:
Diffstat (limited to 'add-shell')
-rwxr-xr-xadd-shell5
1 files changed, 4 insertions, 1 deletions
diff --git a/add-shell b/add-shell
index ea60c91..099bdaa 100755
--- a/add-shell
+++ b/add-shell
@@ -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