]>
git.immae.eu Git - github/fretlink/docker-ansible.git/blob - mini-alpine3/prepare-pkg-list.sh
67c720d4385a2432fb9e0ad3a86f2d8053fbe6d3
3 # Prepare the list of packages to be installed/uninstalled.
5 # ENVIRONMENT VARIABLES:
7 # - APK_LIST: APK package list; default = "apk-list"
8 # - PIP_LIST: PIP package list; default = "pip-list"
11 echo "===> Preparing APK package list..."
13 if [ -z "$APK_LIST" ]; then
17 if [ -f "$APK_LIST" ]; then
22 if (arrayA[i] == "!") { continue; } \
26 $APK_LIST > ___APK_INSTALL_LIST
28 awk '/^(#|!)/ {next} \
29 { split($0,arrayA); for (i in arrayA) print arrayA[i] }' \
31 awk '{ L[n++] = $0 } \
34 > ___APK_UNINSTALL_LIST
37 #cat ___APK_INSTALL_LIST
38 #cat ___APK_UNINSTALL_LIST
41 echo "===> Preparing PIP package list..."
43 if [ -z "$PIP_LIST" ]; then
47 if [ -f "$PIP_LIST" ]; then
52 if (arrayA[i] == "!") { continue; } \
56 $PIP_LIST > ___PIP_INSTALL_LIST
58 awk '/^(#|!)/ {next} \
59 { split($0,arrayA); for (i in arrayA) print arrayA[i] }' \
61 awk '{ L[n++] = $0 } \
64 > ___PIP_UNINSTALL_LIST
67 #cat ___PIP_INSTALL_LIST
68 #cat ___PIP_UNINSTALL_LIST