Skip to content

Commit

Permalink
Install: make pacman init step optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ValShaped committed Jun 24, 2024
1 parent 10e9dd7 commit 553590e
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions rwfus_include/manage-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,22 @@ source "$IncludeDir/testlog.sh"
source "$IncludeDir/config.sh"

function setup_pacman {
if ! Log Test pacman-key --init; then
Log -p echo "Failed to initialize pacman keyring. See $cf_Logfile for details."
elif ! Log Test pacman-key --populate; then
Log -p echo "Failed to populate pacman keyring. See $cf_Logfile for details."
elif ! Log Test pacman -Sy; then
Log -p echo "Failed to synchronize pacman database. See $cf_Logfile for details."
if (confirm "Populate the pacman keyring and sync?"); then
if ! Log Test pacman-key --init; then
Log -p echo "Failed to initialize pacman keyring. See $cf_Logfile for details."
elif ! Log Test pacman-key --populate; then
Log -p echo "Failed to populate pacman keyring. See $cf_Logfile for details."
elif ! Log Test pacman -Sy; then
Log -p echo "Failed to synchronize pacman database. See $cf_Logfile for details."
fi
else
cat <<EOF
To initialize the pacman keyring, run:
# pacman-key --init
# pacman-key --populate
EOF
fi
}

Expand Down

0 comments on commit 553590e

Please sign in to comment.