Skip to content

Commit 83dfd4d

Browse files
committed
[remove] : Removed argument parser
1 parent 14f1f79 commit 83dfd4d

1 file changed

Lines changed: 0 additions & 73 deletions

File tree

channels/i3/airootfs.any/root/customize_airootfs_i3.sh

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -7,79 +7,6 @@
77
# (c) 2019-2021 Fascode Network.
88
#
99

10-
set -e -u
11-
12-
13-
# Default value
14-
# All values can be changed by arguments.
15-
password=alter
16-
boot_splash=false
17-
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
18-
theme_name=alter-logo
19-
rebuild=false
20-
username='alter'
21-
os_name="Alter Linux"
22-
install_dir="alter"
23-
usershell="/bin/bash"
24-
debug=false
25-
timezone="UTC"
26-
localegen="en_US\\.UTF-8\\"
27-
language="en"
28-
29-
30-
# Parse arguments
31-
while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
32-
case "${arg}" in
33-
p) password="${OPTARG}" ;;
34-
b) boot_splash=true ;;
35-
t) theme_name="${OPTARG}" ;;
36-
k) kernel_config_line=(${OPTARG}) ;;
37-
r) rebuild=true ;;
38-
u) username="${OPTARG}" ;;
39-
o) os_name="${OPTARG}" ;;
40-
i) install_dir="${OPTARG}" ;;
41-
s) usershell="${OPTARG}" ;;
42-
d) debug=true ;;
43-
x) debug=true; set -xv ;;
44-
a) arch="${OPTARG}" ;;
45-
g) localegen="${OPTARG/./\\.}\\" ;;
46-
z) timezone="${OPTARG}" ;;
47-
l) language="${OPTARG}" ;;
48-
esac
49-
done
50-
51-
52-
# Parse kernel
53-
kernel="${kernel_config_line[0]}"
54-
kernel_filename="${kernel_config_line[1]}"
55-
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
56-
57-
58-
# Delete file only if file exists
59-
# remove <file1> <file2> ...
60-
function remove () {
61-
local _list
62-
local _file
63-
_list=($(echo "$@"))
64-
for _file in "${_list[@]}"; do
65-
if [[ -f ${_file} ]]; then
66-
rm -f "${_file}"
67-
elif [[ -d ${_file} ]]; then
68-
rm -rf "${_file}"
69-
fi
70-
echo "${_file} was deleted."
71-
done
72-
}
73-
74-
75-
# Replace wallpaper.
76-
if [[ -f /usr/share/backgrounds/xfce/xfce-stripes.png ]]; then
77-
remove /usr/share/backgrounds/xfce/xfce-stripes.png
78-
ln -s /usr/share/backgrounds/alter.png /usr/share/backgrounds/xfce/xfce-stripes.png
79-
fi
80-
[[ -f /usr/share/backgrounds/alter.png ]] && chmod 644 /usr/share/backgrounds/alter.png
81-
82-
8310
# Bluetooth
8411
#rfkill unblock all
8512
#systemctl enable bluetooth

0 commit comments

Comments
 (0)