Move some stuff around in setup.sh

This commit is contained in:
Eryn Wells 2012-04-23 15:02:41 -07:00
parent 9bd3f7bc50
commit 7347be9fe6

View file

@ -1,9 +1,10 @@
#!/bin/zsh #!/bin/zsh
dfdir=$(cd "$(dirname "$0")" && pwd) dfdir=$(cd "$(dirname "$0")" && pwd)
sys=`uname -s | tr A-Z a-z`
print -P "%BSymlinking config files%b" print -P "%BSymlinking config files%b"
for dotfile in `ls .` for dotfile in `ls $dfdir`
do do
# metafiles; don't link them # metafiles; don't link them
[ $dotfile = 'setup.sh' ] && continue [ $dotfile = 'setup.sh' ] && continue
@ -21,14 +22,14 @@ do
spaces='' spaces=''
for (( i=0; $i < $filler; i++ )); do spaces="$spaces " done for (( i=0; $i < $filler; i++ )); do spaces="$spaces " done
echo -n " $dest" echo -n " $dest$spaces"
if [[ $action = 'linked' ]]; then if [[ $action = 'linked' ]]; then
ln -fs "$dfdir/$dotfile" "$dest" ln -fs "$dfdir/$dotfile" "$dest"
action="%F{yellow}$action%f" action="%F{yellow}$action%f"
else else
action="%F{green}$action%f" action="%F{green}$action%f"
fi fi
print -P "$spaces%F{green}$action%f" print -P $action
done done
echo "touch $HOME/.hushlogin" echo "touch $HOME/.hushlogin"