Skip to content

Commit 5ddbbe7

Browse files
author
Derek
committed
feat: make maclike (macOS-style) the default GNOME config for --all
- Changed --all flag from winlike to maclike as default - Updated install.sh and test.sh help text and examples - Removed --force-gnome option (no longer needed since GNOME detection now checks if installed, not running) - If user specifies --winlike with --all, winlike overrides maclike
1 parent 1379b5a commit 5ddbbe7

2 files changed

Lines changed: 27 additions & 35 deletions

File tree

ansible/test.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Test script for running ansible playbooks with install.sh-equivalent flags
33
#
44
# Usage:
5-
# ./test.sh --all # Full installation (winlike)
6-
# ./test.sh --all --maclike # Full installation (maclike)
5+
# ./test.sh --all # Full installation (maclike)
6+
# ./test.sh --all --winlike # Full installation (winlike)
77
# ./test.sh --core # Core tools only
88
# ./test.sh --winlike # Just winlike GNOME config
99
# ./test.sh --maclike # Just maclike GNOME config
@@ -24,8 +24,8 @@ show_help() {
2424
Usage: ./test.sh [OPTIONS] [ANSIBLE_ARGS...]
2525
2626
OPTIONS:
27-
--all Full installation: developer,base,core,advanced,vm,optimizer,rdp,winlike
28-
--all --maclike Full installation with maclike instead of winlike
27+
--all Full installation: developer,base,core,advanced,vm,optimizer,rdp,maclike
28+
--all --winlike Full installation with winlike instead of maclike
2929
--core Core tools: developer,base,core,advanced
3030
--winlike Windows-style GNOME: developer,base,winlike
3131
--maclike macOS-style GNOME: developer,base,maclike
@@ -40,7 +40,7 @@ EXAMPLES:
4040
./test.sh --all --limit fedora # Full install on Fedora only
4141
./test.sh --core --limit ubuntu # Core tools on Ubuntu only
4242
./test.sh --winlike --limit fedora # Just GNOME winlike on Fedora
43-
./test.sh --all --maclike --limit fedora # Full install with maclike
43+
./test.sh --all --winlike --limit fedora # Full install with winlike
4444
4545
INVENTORY:
4646
Default: /tmp/inventory_test.yml
@@ -57,19 +57,20 @@ EOF
5757
}
5858

5959
# Parse arguments
60-
MACLIKE_OVERRIDE=false
60+
WINLIKE_OVERRIDE=false
6161

6262
while [[ $# -gt 0 ]]; do
6363
case $1 in
6464
--all)
65-
TAGS="developer,base,core,advanced,vm,optimizer,rdp,winlike"
65+
TAGS="developer,base,core,advanced,vm,optimizer,rdp,maclike"
6666
shift
6767
;;
6868
--core)
6969
TAGS="developer,base,core,advanced"
7070
shift
7171
;;
7272
--winlike)
73+
WINLIKE_OVERRIDE=true
7374
if [[ -z "$TAGS" ]]; then
7475
TAGS="developer,base,winlike"
7576
else
@@ -78,7 +79,6 @@ while [[ $# -gt 0 ]]; do
7879
shift
7980
;;
8081
--maclike)
81-
MACLIKE_OVERRIDE=true
8282
if [[ -z "$TAGS" ]]; then
8383
TAGS="developer,base,maclike"
8484
else
@@ -116,12 +116,12 @@ while [[ $# -gt 0 ]]; do
116116
esac
117117
done
118118

119-
# Handle maclike override (remove winlike if maclike specified)
120-
if $MACLIKE_OVERRIDE && [[ "$TAGS" == *"winlike"* ]]; then
121-
echo "[INFO] maclike specified - removing winlike from tags"
122-
TAGS="${TAGS//,winlike/}"
123-
TAGS="${TAGS//winlike,/}"
124-
TAGS="${TAGS//winlike/}"
119+
# Handle winlike override (remove maclike if winlike specified with --all)
120+
if $WINLIKE_OVERRIDE && [[ "$TAGS" == *"maclike"* ]]; then
121+
echo "[INFO] winlike specified - removing maclike from tags"
122+
TAGS="${TAGS//,maclike/}"
123+
TAGS="${TAGS//maclike,/}"
124+
TAGS="${TAGS//maclike/}"
125125
fi
126126

127127
# Default tags if none specified

install.sh

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# --tags-include TAGS Include specific tags to run (comma-separated)
1717
# --tags-exclude TAGS Exclude specific tags from running (comma-separated)
1818
# --core Install core developer tools (JFrog, Azure, Node.js, etc.)
19-
# --all Install everything (base + core + VM + RDP + winlike)
19+
# --all Install everything (base + core + VM + RDP + maclike)
2020
# --help Show this help message
2121
#
2222
# SUPPORTED PLATFORMS:
@@ -55,9 +55,7 @@ OPTIONS:
5555
--tags-exclude TAGS Exclude specific tags from running (comma-separated)
5656
--branch BRANCH Git branch to use (default: main)
5757
--core Shortcut for: --tags developer,base,core,advanced
58-
--all Shortcut for: --tags developer,base,core,advanced,vm,optimizer,rdp,winlike
59-
--force-gnome Force GNOME configuration even if no GNOME session is running
60-
(for headless/template builds where GNOME is installed but inactive)
58+
--all Shortcut for: --tags developer,base,core,advanced,vm,optimizer,rdp,maclike
6159
--help Show this help message
6260
6361
AVAILABLE TAGS:
@@ -103,8 +101,8 @@ EXAMPLES:
103101
Install everything except wallpaper:
104102
./install.sh --all --tags-exclude wallpaper
105103
106-
Install everything with macOS-style (maclike overrides winlike):
107-
./install.sh --all --tags maclike
104+
Install everything with Windows-style (winlike overrides default maclike):
105+
./install.sh --all --tags winlike
108106
109107
Install RDP support for remote desktop access:
110108
./install.sh --tags developer,base,rdp
@@ -113,7 +111,7 @@ EXAMPLES:
113111
./install.sh --check
114112
115113
NOTES:
116-
- If both winlike and maclike are included, maclike takes precedence
114+
- If both winlike and maclike are included, winlike takes precedence (overrides default)
117115
- RDP configures GNOME Remote Desktop with default credentials (dfe/dfe)
118116
- ghostty, fastestmirror, and wallpaper are included by default
119117
- Use --tags-exclude to disable default features without specifying all tags
@@ -161,13 +159,7 @@ while [[ $# -gt 0 ]]; do
161159
shift
162160
;;
163161
--all)
164-
ANSIBLE_TAGS="--tags developer,base,core,advanced,vm,optimizer,rdp,winlike"
165-
shift
166-
;;
167-
--force-gnome)
168-
# Force GNOME configuration even if gnome-shell isn't running
169-
# Useful for headless/template builds where GNOME is installed but not active
170-
ANSIBLE_EXTRA_VARS="-e dfe_force_gnome=true"
162+
ANSIBLE_TAGS="--tags developer,base,core,advanced,vm,optimizer,rdp,maclike"
171163
shift
172164
;;
173165
--help|-h)
@@ -181,13 +173,13 @@ while [[ $# -gt 0 ]]; do
181173
esac
182174
done
183175

184-
# Handle maclike/winlike priority: maclike overrides winlike
185-
# If both are specified, remove winlike from tags
186-
if [[ "$ANSIBLE_TAGS" == *"maclike"* ]] && [[ "$ANSIBLE_TAGS" == *"winlike"* ]]; then
187-
print_info "Both maclike and winlike specified - using maclike (maclike takes precedence)"
188-
ANSIBLE_TAGS="${ANSIBLE_TAGS//,winlike/}"
189-
ANSIBLE_TAGS="${ANSIBLE_TAGS//winlike,/}"
190-
ANSIBLE_TAGS="${ANSIBLE_TAGS//winlike/}"
176+
# Handle winlike/maclike priority: winlike overrides maclike (since maclike is default in --all)
177+
# If both are specified, remove maclike from tags
178+
if [[ "$ANSIBLE_TAGS" == *"winlike"* ]] && [[ "$ANSIBLE_TAGS" == *"maclike"* ]]; then
179+
print_info "Both winlike and maclike specified - using winlike (winlike overrides default maclike)"
180+
ANSIBLE_TAGS="${ANSIBLE_TAGS//,maclike/}"
181+
ANSIBLE_TAGS="${ANSIBLE_TAGS//maclike,/}"
182+
ANSIBLE_TAGS="${ANSIBLE_TAGS//maclike/}"
191183
fi
192184

193185
# Detect operating system

0 commit comments

Comments
 (0)