mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
disable apt and add script for persisting apt pkgs (#2225)
* disable apt and add script for persisting apt pkgs * fix typo * exit 1 on fake-apt * readd fake-apt after upgrade * fix typo * remove finicky protection * fix build
This commit is contained in:
20
build/lib/scripts/persist-apt-install
Executable file
20
build/lib/scripts/persist-apt-install
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
>&2 echo "usage: $0 <PACKAGE_NAME>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TO_INSTALL=()
|
||||
while [ -n "$1" ]; do
|
||||
if ! dpkg -s "$1"; then
|
||||
TO_INSTALL+=("$1")
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if [ ${#TO_INSTALL[@]} -ne 0 ]; then
|
||||
/usr/lib/embassy/scripts/chroot-and-upgrade << EOF
|
||||
apt-get update && apt-get install -y ${TO_INSTALL[@]}
|
||||
EOF
|
||||
fi
|
||||
Reference in New Issue
Block a user