~mil/f_scripts

ref: 74b5b03866c16eceb9cbac37a8c9f82d2f4b6404 f_scripts/genscripts/gen_localdev.sh -rwxr-xr-x 374 bytes
74b5b038Miles Alan f_maps: populate fbp strings based on mepo_ui_central_menu.sh menuoptions kbs 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env osh

alldeps() {
  cat scripts/* |
    grep DEP | 
    cut -d= -f2 |
    tr -d '"' |
    grep -oE '[0-9a-zA-Z_-]+' |
    tr '\n' ' '
}

installalldeps() {
  [ $(whoami) = root ] || { echo "Run as root"; kill 0; }
  DEPS="$(alldeps)"
  apk add $DEPS
}

main() {
  cd "$(dirname $(realpath $0))/../"
  installalldeps
}

if [ -n "$1" ]; then "$@"; else main; fi