diff options
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1087,8 +1087,9 @@ fi printf "\n%.0s" {1..1} # wallpaper stuff -mkdir -p $HOME/Pictures/wallpapers -if cp -r wallpapers $HOME/Pictures/; then +PICTURES_DIR="$(xdg-user-dir PICTURES 2>/dev/null || echo "$HOME/Pictures")" +mkdir -p "$PICTURES_DIR/wallpapers" +if cp -r wallpapers "$PICTURES_DIR/"; then echo "${OK} Some ${MAGENTA}wallpapers${RESET} copied successfully!" | tee -a "$LOG" else echo "${ERROR} Failed to copy some ${YELLOW}wallpapers${RESET}" | tee -a "$LOG" @@ -1168,12 +1169,12 @@ while true; do echo "${OK} Wallpapers downloaded successfully." 2>&1 | tee -a "$LOG" # Check if wallpapers directory exists and create it if not - if [ ! -d "$HOME/Pictures/wallpapers" ]; then - mkdir -p "$HOME/Pictures/wallpapers" + if [ ! -d "$PICTURES_DIR/wallpapers" ]; then + mkdir -p "$PICTURES_DIR/wallpapers" echo "${OK} Created wallpapers directory." 2>&1 | tee -a "$LOG" fi - if cp -R Wallpaper-Bank/wallpapers/* "$HOME/Pictures/wallpapers/" >>"$LOG" 2>&1; then + if cp -R Wallpaper-Bank/wallpapers/* "$PICTURES_DIR/wallpapers/" >>"$LOG" 2>&1; then echo "${OK} Wallpapers copied successfully." 2>&1 | tee -a "$LOG" rm -rf Wallpaper-Bank 2>&1 # Remove cloned repository after copying wallpapers break |
