File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ SCRIPT=" $( cd " $( dirname " $0 " ) " && pwd) /US-House-Apps.sh"
5+
6+ if [[ ! -x " $SCRIPT " ]]; then
7+ chmod +x " $SCRIPT "
8+ fi
9+
10+ if [[ " ${1:- menu} " != " menu" ]]; then
11+ exec " $SCRIPT " " $@ "
12+ fi
13+
14+ cat << 'MENU '
15+ US HOUSE — macOS SOFTWARE CONVENIENCE
16+ 1. List catalog
17+ 2. Install
18+ 3. Update
19+ 4. Remove
20+ 5. Status
21+ 6. Upgrade all
22+ 7. Repair
23+ 8. Exit
24+ MENU
25+
26+ read -r -p ' Select: ' choice
27+ case " $choice " in
28+ 1) exec " $SCRIPT " list ;;
29+ 2) action=install ;;
30+ 3) action=update ;;
31+ 4) action=remove ;;
32+ 5) action=status ;;
33+ 6) exec " $SCRIPT " upgrade-all ;;
34+ 7) action=repair ;;
35+ 8) exit 0 ;;
36+ * ) echo ' Invalid selection.' ; exit 2 ;;
37+ esac
38+
39+ read -r -p ' Vendor (microsoft/apple): ' vendor
40+ read -r -p ' Package alias: ' package
41+ exec " $SCRIPT " " $action " " $vendor " " $package "
You can’t perform that action at this time.
0 commit comments