24 lines
466 B
Bash
Executable File
24 lines
466 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"
|
|
|
|
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
|
|
|