-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre-compile.sh
83 lines (61 loc) · 2.23 KB
/
pre-compile.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
#!/bin/bash
clear
# Toggle "Show Hidden Files" Off in thunar
xfconf-query -c thunar -p /last-show-hidden -s false
figlet "WARNING"
echo "This script is meant to prepare system for public build, DO NOT RUN IT, if you don't know what you're doing!"
# Simple script to run prior to compiling a public .iso for new version
sleep 3
clear
echo "Starting process..."
# to be sure
cd
# Make sure skel perms works
sudo chmod -R 755 /etc/skel/.config
# vbox log trash
rm .vbox*
# .conky
sudo rm -rf /etc/skel/.conky
sudo cp -r ~/.conky /etc/skel/.conky
# .config dir
sudo rm -rf /etc/skel/.config
sudo cp -r ~/.config /etc/skel/.config
# Get rid of session files
sudo rm -r /etc/skel/.config/session
#sudo rm -r /etc/skel/.config/chromium
# Szmelc dir
sudo rm -fr /etc/skel/szmelc
sudo cp -r ~/szmelc /etc/skel/szmelc
# bashrc
# sudo rm -fr /etc/skel/.bashrc
# sudo cp ~/.bashrc /etc/skel/.bashrc
sudo rm /etc/skel/.zshrc
sudo cp ~/.zshrc /etc/skel/.zshrc
sudo rm /etc/skel/.p10k.zsh
sudo cp ~/.p10k.zsh /etc/skel/.p10k.zsh
sudo rm /etc/skel/.zcompdump
sudo cp ~/.zcompdump /etc/skel/.zcompdump
sudo rm -fr /etc/skel/.local
sudo cp -r /home/szmelc/.local /etc/skel/.local
# REMOVE USER DATA FROM BROWSER
sudo rm -f /etc/skel/.config/chromium/Default/{Login\ Data*,Cookies,History,History-journal,Web\ Data*,Top\ Sites*,Visited\ Links,Current\ Session,Current\ Tabs,Last\ Session,Last\ Tabs}
# sudo rm -f $HOME/.config/chromium/Default/{Login\ Data*,Cookies,History,History-journal,Web\ Data*,Top\ Sites*,Visited\ Links,Current\ Session,Current\ Tabs,Last\ Session,Last\ Tabs}
sleep 3
# Prompt the user for the Build ID string
read -p "Build ID: " build
echo "$build" | sudo tee /etc/.entropy-build > /dev/null
# Prompt the user for the new version number
read -p "Enter the new version number (e.g., 9): " new_version
# Define the files to update
FILES=("/etc/initrd_release" "/etc/lsb-release")
# Loop through each file and replace vX with the new version
for FILE in "${FILES[@]}"; do
if [ -f "$FILE" ]; then
# Use sed to replace v8 or any vX with the specified version
sudo sed -i "s/v[0-9]\+/v$new_version/g" "$FILE"
echo "Updated version in $FILE to v$new_version"
else
echo "$FILE not found."
fi
done
echo "Complete"