Add mkdir -p for config file directory creation.

This commit is contained in:
giomba 2023-08-17 15:02:20 +02:00
parent b27b59077c
commit 9a181aa6e5
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ 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]}"
@ -16,6 +17,7 @@ for key in "${!dots[@]}"; do
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