hidden configuration dot files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
466 B

#!/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"
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
ln -s $(pwd)/"$key" $value
echo -e "${CGREEN}ok${CNONE}"
fi
done