refactor: v3

This commit is contained in:
Strix 2023-10-14 22:38:07 +02:00
parent 9434b666e5
commit 4c7c6b5307
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
26 changed files with 55 additions and 242 deletions

View file

@ -0,0 +1,6 @@
#!/bin/sh
# This file only installs what is needed for the sync to perform...
$SUDO $PM $PM_INSTALL $PM_NOCONFIRM \
rsync

8
scripts/10-copy-files.sh Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
HOME_FILES=${HOME_FILES:-./files/home}
ROOT_FILES=${ROOT_FILES:-./files/root}
# overwrite files but preserve files surrounding
rsync -av $HOME_FILES/ $HOME
$SUDO rsync -av $ROOT_FILES/ /

View file

@ -0,0 +1,23 @@
#!/bin/sh
PACKAGE_LIST=${PACKAGE_LIST:-./package.list}
GRAPHICAL_PACKAGE_LIST=${GRAPHICAL_PACKAGE_LIST:-./gpackage.list}
_APPLICATIONS=""
while read -r pkg; do
[ -z "$pkg" ] && continue
[ "$(echo "$pkg" | cut -c1)" = "#" ] && continue
_APPLICATIONS="$_APPLICATIONS $pkg"
done < "$PACKAGE_LIST"
if [ "${GRAPHICAL:-no}" = "yes" ]; then
if [ -f "$GRAPHICAL_PACKAGE_LIST" ]; then
while read -r pkg; do
[ -z "$pkg" ] && continue
[ "$(echo "$pkg" | cut -c1)" = "#" ] && continue
_APPLICATIONS="$_APPLICATIONS $pkg"
done < "$GRAPHICAL_PACKAGE_LIST"
fi
fi
$SUDO $PM $PM_INSTALL $PM_NOCONFIRM $_APPLICATIONS