16 lines
301 B
Bash
Executable file
16 lines
301 B
Bash
Executable file
#!/bin/sh
|
|
PKG_LIST="${PKG_LIST:-$XDG_CONFIG_HOME/apt/packages}"
|
|
|
|
if ! [ -f "$PKG_LIST" ]; then
|
|
echo "No package list found at PKG_LIST=$PKG_LIST"
|
|
exit 1
|
|
fi
|
|
|
|
pkgs="$(while read l; do
|
|
pkg="${l%%#*}"
|
|
if [ "$pkg" != "" ]; then
|
|
printf '%s ' "$pkg"
|
|
fi
|
|
done < "$PKG_LIST")"
|
|
|
|
sudo apt install -y $pkgs
|