aiming for /bin/sh compatibility
This commit is contained in:
parent
6d1487c87f
commit
74d4cc70ee
1 changed files with 5 additions and 5 deletions
10
newbox
10
newbox
|
|
@ -15,7 +15,9 @@ if ! which zsh >/dev/null 2>&1; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
chsh -s `which zsh`
|
#
|
||||||
|
# FIXME figure out how to change the shell semi-interactively (only type in password)
|
||||||
|
#chsh `which zsh`
|
||||||
|
|
||||||
if ! which git >/dev/null 2>&1; then
|
if ! which git >/dev/null 2>&1; then
|
||||||
if which aptitude >/dev/null 2>&1; then
|
if which aptitude >/dev/null 2>&1; then
|
||||||
|
|
@ -29,18 +31,16 @@ if ! which git >/dev/null 2>&1; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
if [[ ! -d config ]]; then
|
if ! [ -d config ]; then
|
||||||
git clone git://github.com/samsonjs/config || fail "cannot clone config repo"
|
git clone git://github.com/samsonjs/config || fail "cannot clone config repo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for FILE in config/*; do
|
for FILE in config/*; do
|
||||||
pushd "$HOME"
|
|
||||||
DOTFILE=".${FILE##*/}"
|
DOTFILE=".${FILE##*/}"
|
||||||
if [[ -e "$DOTFILE" ]]; then
|
if [ -e "$DOTFILE" ]; then
|
||||||
mkdir original-dot-files >/dev/null 2>/dev/null
|
mkdir original-dot-files >/dev/null 2>/dev/null
|
||||||
echo "Existing file found at $DOTFILE, moving to ~/original-dot-files."
|
echo "Existing file found at $DOTFILE, moving to ~/original-dot-files."
|
||||||
mv "$DOTFILE" original-dot-files/
|
mv "$DOTFILE" original-dot-files/
|
||||||
fi
|
fi
|
||||||
ln -s "$FILE" "$DOTFILE"
|
ln -s "$FILE" "$DOTFILE"
|
||||||
popd
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue