-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch.sh
executable file
·130 lines (72 loc) · 2.65 KB
/
fetch.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/env bash
################################################################################
### Head: Init
##
THE_BASE_DIR_PATH="$(cd -- "$(dirname -- "${0}")" ; pwd)"
#THE_INIT_DIR_PATH="${THE_BASE_DIR_PATH}/../ext"
#. "${THE_INIT_DIR_PATH}/init.sh"
##
### Tail: Init
################################################################################
################################################################################
### Head: Util / Debug
##
util_error_echo () {
echo "${@}" 1>&2
}
##
### Head: Util / Debug
################################################################################
################################################################################
### Head: Model / mod_fetch
##
mod_fetch () {
local tmp_download_dir_path="${HOME}/.cache/grub-theme-download"
util_error_echo
util_error_echo sudo mkdir -p "/boot/grub/themes"
sudo mkdir -p "/boot/grub/themes"
util_error_echo
util_error_echo mkdir -p "${tmp_download_dir_path}"
mkdir -p "${tmp_download_dir_path}"
util_error_echo
util_error_echo wget -c "https://github.com/samwhelp/grub-theme-cover/archive/refs/heads/main.tar.gz" -O "${tmp_download_dir_path}/grub-theme-cover-main.tar.gz"
wget -c "https://github.com/samwhelp/grub-theme-cover/archive/refs/heads/main.tar.gz" -O "${tmp_download_dir_path}/grub-theme-cover-main.tar.gz"
util_error_echo
util_error_echo tar xf "${tmp_download_dir_path}/grub-theme-cover-main.tar.gz" -C "${tmp_download_dir_path}"
tar xf "${tmp_download_dir_path}/grub-theme-cover-main.tar.gz" -C "${tmp_download_dir_path}"
util_error_echo
util_error_echo sudo mkdir -p "/boot/grub/themes"
sudo mkdir -p "/boot/grub/themes"
util_error_echo
util_error_echo sudo cp -rf "${tmp_download_dir_path}/grub-theme-cover-main/." "/boot/grub/themes/grub-theme-cover"
sudo cp -rf "${tmp_download_dir_path}/grub-theme-cover-main/." "/boot/grub/themes/grub-theme-cover"
util_error_echo
return 0
}
##
### Tail: Model / mod_fetch
################################################################################
################################################################################
### Head: Model / main_fetch
##
main_fetch () {
util_error_echo
util_error_echo "##"
util_error_echo "## ## main_fetch"
util_error_echo "##"
mod_fetch
return 0
}
##
### Tail: Model / main_fetch
################################################################################
################################################################################
### Head: Main
##
__main__ () {
main_fetch "${@}"
}
__main__ "${@}"
##
### Tail: Main
################################################################################