doinstall: introduce install script.
This commit is contained in:
parent
18b6cd2c4a
commit
4b45e322db
23
dotinstall
Executable file
23
dotinstall
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user