-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate.sh
39 lines (32 loc) · 1.05 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
IMG_READ_PATH="customizer/background/"
MOD_IMG_PATH="backgrounds/"
BACKGROUND_OPTION=("2k" "4k" "1080p" "ultrawide" "ultrawide2k")
# Customizer background
imgFiles=$(ls $IMG_READ_PATH)
if [ -z "${imgFiles[*]}" ]; then
echo "No background Found"
else
for file in ${imgFiles[@]}; do
if [ ${file##*.} = "png" ] || [ ${file##*.} = "jpg" ] || [ ${file##*.} = "jpge" ]; then
echo "Found background" $file
read -p "Confirm (y/n)?" choice
case $choice in
[Nn])
echo "Continue without customizering the wallpaper"
;;
[yY] | "")
echo "Customizing your background"
for folder in ${BACKGROUND_OPTION[@]}; do
cp -f $IMG_READ_PATH$file $MOD_IMG_PATH$folder"/background-tela.jpg"
done
;;
*)
echo "None"
;;
esac
break
fi
done
fi
sudo ./install.sh $@