let mkdir handle making parents

This commit is contained in:
Adam 2024-01-25 02:04:35 -05:00
parent 37fe063060
commit fe0a7ac109
2 changed files with 4 additions and 8 deletions

View file

@ -16,7 +16,7 @@ printf "\n\nInstalling Scripts..."
cd ../
if [ ! -d "$HOME/.local/bin" ]; then
mkdir "$HOME/.local/bin"
mkdir -p "$HOME/.local/bin"
fi
cp -rb bin "$HOME"/.local

10
setup
View file

@ -118,19 +118,15 @@ cd "$HOME"/.doors &&
"$HOME"/.doors/scripts/copy_and_link "$input"
# Copy default wallpaper
if ! test -d "$HOME"/Pictures; then
mkdir "$HOME"/Pictures
fi
if ! test -d "$HOME"/Pictures/Wallpapers; then
mkdir "$HOME"/Pictures/Wallpapers
fi
if ! test -f "$HOME"/Pictures/Wallpapers/door2.jpg; then
if ! test -d "$HOME"/Pictures/Wallpapers; then
mkdir -p "$HOME"/Pictures/Wallpapers
printf "Downloading default wallpaper...\n"
curl -so "$HOME"/Pictures/Wallpapers/door2.jpg https://old.doordesk.net/door2.jpg &&
wal -ensqi "$HOME"/Pictures/Wallpapers
fi
fi
# Wrap up
printf "\nDone!\nLog out and back in for changes to take effect."