@@ -22,6 +22,33 @@ get_distribution() {
2222# Get the distribution
2323DISTRO=$( get_distribution)
2424
25+ # Default Branch
26+ BRANCH=" stable"
27+
28+ # Parse arguments for --branch
29+ while [ " $# " -gt 0 ]; do
30+ case " $1 " in
31+ --branch)
32+ if [ -n " $2 " ]; then
33+ BRANCH=" $2 "
34+ shift 2
35+ continue
36+ else
37+ echo " Error: --branch requires a value (e.g. --branch dev)" >&2
38+ exit 1
39+ fi
40+ ;;
41+ --branch=* )
42+ BRANCH=" ${1#* =} "
43+ shift
44+ continue
45+ ;;
46+ * )
47+ shift
48+ ;;
49+ case
50+ done
51+
2552# Function to print the current step
2653log_step() {
2754 echo " Step $1 : $2 "
@@ -86,9 +113,10 @@ if [ -d "/usr/share/thinOS" ] && [ ! -f "/usr/share/thinOS/.gitmodules" ]; then
86113 sudo rm -rf /usr/share/thinOS
87114fi
88115if [ -d " /usr/share/thinOS/.git" ]; then
116+ sudo git -C /usr/share/thinOS checkout $BRANCH
89117 sudo git -C /usr/share/thinOS pull --recurse-submodules
90118else
91- sudo git clone --recursive --branch dev https://github.com/LaswitchTech/thinOS.git /usr/share/thinOS
119+ sudo git clone --recursive --branch $BRANCH https://github.com/LaswitchTech/thinOS.git /usr/share/thinOS
92120fi
93121
94122# Configure uDevil to allow non-sudo mounting of USB drives
@@ -112,9 +140,10 @@ if [ -d "/usr/share/PyRDPConnect" ] && [ ! -f "/usr/share/PyRDPConnect/.gitmodul
112140 sudo rm -rf /usr/share/PyRDPConnect
113141fi
114142if [ -d " /usr/share/PyRDPConnect/.git" ]; then
143+ sudo git -C /usr/share/PyRDPConnect checkout $BRANCH
115144 sudo git -C /usr/share/PyRDPConnect pull --recurse-submodules
116145else
117- sudo git clone --recursive --branch dev https://github.com/LaswitchTech/PyRDPConnect.git /usr/share/PyRDPConnect
146+ sudo git clone --recursive --branch $BRANCH https://github.com/LaswitchTech/PyRDPConnect.git /usr/share/PyRDPConnect
118147fi
119148
120149# Create a gradient background image
0 commit comments