diff options
author | Matthew Lemon <y@yulqen.org> | 2024-04-18 04:50:38 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-04-18 04:50:38 +0100 |
commit | b54e8f3cb5ca55ba630f45cb8a6d11789b64585e (patch) | |
tree | 0c71c8887e4fcb2ffbb32a2827100bb5eac6a0b0 | |
parent | 3c0f2f74d48507cb4e886d6ddc5d839b10ae3503 (diff) | |
parent | 7045aea8612704fa9f75a8d3d351b845444d01f6 (diff) |
Merge branch 'master' of ssh://git.yulqen.org:2222/home/git/repositories/shell/bash-scripts
-rw-r--r-- | backup-home-to-linux-storage | 1 | ||||
-rwxr-xr-x | music.sh | 2 | ||||
-rwxr-xr-x | resize_img_files_to_max_400.sh | 15 |
3 files changed, 17 insertions, 1 deletions
diff --git a/backup-home-to-linux-storage b/backup-home-to-linux-storage new file mode 100644 index 0000000..e2a9f6a --- /dev/null +++ b/backup-home-to-linux-storage @@ -0,0 +1 @@ +rsync -av --exclude='.cache' --exclude='.fgfs' --exclude='vms' /home/lemon/ /mnt/home_backup_mar24/ @@ -6,7 +6,7 @@ ### ----------------------------------------------------------------- ### Global variables: ### ----------------------------------------------------------------- -DIR=~/annex/Music +DIR=~/music_mnt/annex/Music PLAYER=mpv DMENU='dmenu -i -l 30 -fn Iosevka-12 -nb #b96dbf -nf white' diff --git a/resize_img_files_to_max_400.sh b/resize_img_files_to_max_400.sh new file mode 100755 index 0000000..cceeae7 --- /dev/null +++ b/resize_img_files_to_max_400.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Navigate to the directory containing your images +cd /home/lemon/code/html/jo-rebrand/img/ + +# Loop through each image file +for file in *.jpg *.JPG *.png *.gif; do + # Check if the file exists and is a regular file + if [ -f "$file" ]; then + # Resize the image using ImageMagick's convert command + convert "$file" -resize '400x>' "$file" + echo "Resized $file" + fi +done + |