Skip to content

Commit b12ae66

Browse files
feat: support for comments and empty lines in run_order file
This commit adds support for comments and empty lines in the run_order.txt file. Comments must start with '#' character, without the quotes. The following is now supported: # === Install packages === # Browsers google_chrome.sh # Compilers gcc-12.sh python3.11.sh openjdk17.sh
1 parent 08fee02 commit b12ae66

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

install.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ export DEBCONF_NONINTERACTIVE_SEEN=true
55

66
shdir="scripts"
77

8-
for bashfile in $(cat $shdir/run_order.txt); do
9-
echo -e "\nExecuting $bashfile ...\n"
10-
bash "$shdir/$bashfile"
8+
run_order="$shdir/run_order.txt"
9+
if [[ ! -f "$run_order" ]]; then
10+
echo "error: run_order.txt not found" >&2
11+
exit 1
12+
fi
13+
14+
scripts=( $(cat "$run_order" | grep "\S" | grep -v "^#" ) )
15+
for script in "${scripts[@]}"; do
16+
echo -e "\nExecuting $script ...\n"
17+
bash "$shdir/$script"
1118
done

scripts/run_order.txt

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,52 @@
1+
# === Upgrade packages ===
2+
13
dist_upgrade.sh
4+
5+
# === Add multiple repos ===
6+
27
add_repo.sh
8+
9+
# === Remove unnecessary packages ===
10+
311
trim.sh
12+
13+
# === Install packages ===
14+
15+
# --- Browsers ---
416
google_chrome.sh
17+
18+
# --- Compilers ---
519
gcc-12.sh
620
python3.11.sh
721
openjdk17.sh
8-
openssh_server.sh
22+
23+
# --- Editors ---
24+
vim.sh
25+
emacs.sh
926
code.sh
27+
sublime.sh
28+
29+
# --- IDEs ---
1030
codeblocks.sh
31+
geany.sh
1132
pycharm_community.sh
1233
intellij_idea_community.sh
13-
sublime.sh
14-
vim.sh
15-
emacs.sh
16-
geany.sh
34+
35+
# --- Additional support packages ---
36+
openssh_server.sh
37+
38+
# === Upgrade packages ===
39+
1740
dist_upgrade.sh
41+
42+
# === Copy universal dot files ===
43+
1844
copy_dots.sh
45+
46+
# === Create users ===
47+
1948
add_users.sh
49+
50+
# === Copy user-specific files ===
51+
2052
copy_admin_scripts.sh

0 commit comments

Comments
 (0)