dotfiles/dotinstall

26 lines
554 B
Bash
Executable File

#!/bin/bash
CGREEN='\033[0;32m'
CYELLOW='\033[1;33m'
CNONE='\033[0m'
declare -A dots
dots["gitignore"]="$HOME/.gitignore"
dots["vimrc"]="$HOME/.vimrc"
dots["zshrc"]="$HOME/.zshrc"
dots["terminator"]="$HOME/.config/terminator/config"
for key in "${!dots[@]}"; do
value="${dots[$key]}"
# echo "key, value = $key, $value"
echo -e -n "$key: "
if [ -a "$value" ]; then
echo -e "${CYELLOW}skip${CNONE}"
else
mkdir -p $(dirname $value)
ln -s $(pwd)/"$key" $value
echo -e "${CGREEN}ok${CNONE}"
fi
done