mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-07 00:05:10 +01:00
Fixed quoting and such
This commit is contained in:
17
install.sh
17
install.sh
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# inspired by rrix' dotfiles
|
# inspired by rrix' dotfiles
|
||||||
|
|
||||||
install_hg()
|
install_hg()
|
||||||
@@ -27,14 +27,13 @@ install_hg()
|
|||||||
# Get the directory the dotfiles have been cloned into
|
# Get the directory the dotfiles have been cloned into
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
echo "Installing from $DIR"
|
echo "Installing from $DIR"
|
||||||
DATETIME=`date +%Y%m%d_%H%M`
|
DATETIME=$(date +%Y%m%d_%H%M)
|
||||||
|
|
||||||
# Go home
|
# Go home
|
||||||
cd
|
cd
|
||||||
|
|
||||||
# Symlink all the things
|
# Symlink all the things
|
||||||
for TARGET
|
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitmodules .hgauthors.txt .hgignore .hgrc .screenrc .terminfo .tmux.conf .vim .vimrc install.sh
|
||||||
in .bash_aliases .bashrc bin .gitconfig .gitmodules .hgauthors.txt .hgignore .hgrc .screenrc .terminfo .tmux.conf .vim .vimrc install.sh
|
|
||||||
do
|
do
|
||||||
cd
|
cd
|
||||||
echo $TARGET
|
echo $TARGET
|
||||||
@@ -47,7 +46,7 @@ do
|
|||||||
mkdir -p "workspace/backup/dotfiles_$DATETIME"
|
mkdir -p "workspace/backup/dotfiles_$DATETIME"
|
||||||
fi
|
fi
|
||||||
DIRNAME=$(dirname ${TARGET})
|
DIRNAME=$(dirname ${TARGET})
|
||||||
if [ $DIRNAME != "." ]; then
|
if [ "$DIRNAME" != "." ]; then
|
||||||
mkdir "workspace/backup/dotfiles_$DATETIME/$DIRNAME"
|
mkdir "workspace/backup/dotfiles_$DATETIME/$DIRNAME"
|
||||||
mv $TARGET "workspace/backup/dotfiles_$DATETIME/$DIRNAME"
|
mv $TARGET "workspace/backup/dotfiles_$DATETIME/$DIRNAME"
|
||||||
#echo "workspace/backup/privdotfiles_$DATETIME/$DIRNAME"
|
#echo "workspace/backup/privdotfiles_$DATETIME/$DIRNAME"
|
||||||
@@ -59,11 +58,11 @@ do
|
|||||||
|
|
||||||
# If link is in a subdir, go there
|
# If link is in a subdir, go there
|
||||||
DIRNAME=$(dirname ${TARGET})
|
DIRNAME=$(dirname ${TARGET})
|
||||||
if [ $DIRNAME != "." ]; then
|
if [ "$DIRNAME" != "." ]; then
|
||||||
cd $DIRNAME
|
cd "$DIRNAME"
|
||||||
fi
|
fi
|
||||||
# Create the symlink
|
# Create the symlink
|
||||||
ln -s $DIR/$TARGET
|
ln -s "$DIR/$TARGET"
|
||||||
#echo "ln -s $DIR/$TARGET"
|
#echo "ln -s $DIR/$TARGET"
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -73,7 +72,7 @@ git submodule init
|
|||||||
echo "INFO: Update submodules"
|
echo "INFO: Update submodules"
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
if [ ! -d "~/.vim/bundle/Vundle.vim" ]; then
|
if [ ! -d "${HOME}/.vim/bundle/Vundle.vim" ]; then
|
||||||
mkdir -p ~/.vim/bundle
|
mkdir -p ~/.vim/bundle
|
||||||
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user