tweaks and changes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-11-22 09:44:29 -05:00
parent ab7154030b
commit 8c95ca4f84

43
post-install Normal file → Executable file
View File

@ -40,7 +40,7 @@ USER_SCRIPT_DIR=${0}.d/user/
# System info...
if ! [ -z "$(type -t dmidecode )" ] ; then
# XXX should we be more specific here and include model number??
PLATFORM=$( dmidecode \
PLATFORM=$( sudo dmidecode \
| grep -A3 '^System Information' \
| grep 'Version:' \
| sed 's/\s*Version:\s*//' )
@ -59,6 +59,7 @@ PLATFORM_SCRIPT_DIR=${SCRIPT_DIR}/platform/${PLATFORM}
FEATURES=(
dir
dnf-config
dnf
flatpak
npm
@ -207,6 +208,7 @@ SAVE=(
# XXX this should be split into system and user sections...
ALL_FEATURES=(
# system...
dnf-config
dnf
flatpak
snap
@ -215,7 +217,7 @@ ALL_FEATURES=(
start-services
# user..
# user...
dir
syncthing
@ -226,6 +228,8 @@ ALL_FEATURES=(
start-user-services
gnome
# keep this last...
scripts
platform-scripts
@ -233,6 +237,24 @@ ALL_FEATURES=(
)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function feature-dnf-config(){
if [ -z "$(grep 'f_lynx/post-install' /etc/dnf/dnf.conf)" ] ; then
echo Updating config
# a bit ugly...
cat << EOF | sudo tee -a /etc/dnf/dnf.conf > /dev/null
# added by f_lynx/post-install script...
fastmirror=True
max_parallel_downloads=10
defaultyes=True
EOF
else
echo Already updated.
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function feature-dir(){
@setupList mkdir -p - ${DIR[@]}
@ -369,8 +391,8 @@ function feature-syncthing(){
# - link device
# - share ALL directory
# - wait for sync
@ echo "Waiting for Syncthing to be connected with other devices manually."
@ read -p "(press any key when done)"
echo "Waiting for Syncthing to be connected with other devices manually."
read -p "(press any key when done)"
}
@ -541,9 +563,10 @@ Options:
-d | --dry-run - report the actions but do nothing.
-q | --quiet - run in quiet mode.
--list-features - list enabled features.
--list-all-features - list supported features.
--list-scripts - list available scripts.
-l | --list-features - list enabled features.
-la | --list-all-features
- list supported features.
-ls | --list-scripts - list available scripts.
External configuration:
-s | --source FILE - read config from file.
@ -597,15 +620,15 @@ while ! [ -z "$1" ] ; do
;;
# introspection...
--list-features)
-l|--list-features)
echo ${FEATURES[@]}
exit
;;
--list-all-features)
-la|--list-all-features)
echo ${ALL_FEATURES[@]}
exit
;;
--list-scripts)
-ls|--list-scripts)
listScripts
exit
;;