-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacos
executable file
·44 lines (37 loc) · 845 Bytes
/
macos
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
#!/bin/bash
set -e
PROJECT_DIR="$(dirname "$(realpath "$0")")"
UTILS="$PROJECT_DIR/utils"
MAC_CONFIG="$PROJECT_DIR/os/mac"
TOOLS="$PROJECT_DIR/tools"
TOOLS_FILE="$MAC_CONFIG/.macos_tools"
export TOOLS TOOLS_FILE
usage() {
echo "Usage: $0 [update] [--skip task1,task2,...]"
echo " update Run the update process"
echo " --skip Comma-separated list of tasks to skip (brew, zsh, lastpass)"
exit 1
}
# Parse command-line arguments
update=false
skip_tasks=""
while [[ $# -gt 0 ]]; do
case $1 in
update)
update=true
shift
;;
--skip)
skip_tasks=$2
shift 2
;;
*)
usage
;;
esac
done
if $update; then
$UTILS/update.sh --skip "$skip_tasks"
else
$UTILS/setup.sh --skip "$skip_tasks"
fi