diff --git a/command.list b/command.list index 7ec30e1..a67257b 100644 --- a/command.list +++ b/command.list @@ -1,4 +1,5 @@ -^pacman -Syyu +^. ./sync.conf && $PM_COMMAND $PM_UPGRADE ^[ -d /tmp/yay ] && rm -rf /tmp/yay + git clone https://aur.archlinux.org/yay /tmp/yay cd /tmp/yay && makepkg --noconfirm -si && echo $PREF_TERM \ No newline at end of file diff --git a/sync.conf b/sync.conf index 2a6caa7..8c57fc4 100644 --- a/sync.conf +++ b/sync.conf @@ -1,9 +1,10 @@ # PM - Package Manager Options PM_COMMAND=${PM_COMMAND:-pacman} -PM_NOCONFIRM_ARG=${PM_NOCONFIRM_ARG:-"--noconfirm"} -PM_INSTALL_ARG=${PM_INSTALL_ARG:--S} -PM_REMOVE_ARG=${PM_REMOVE_ARG:-R} -PM_UPDATE_ARG=${PM_UPDATE_ARG:-Sy} +PM_NOCONFIRM=${PM_NOCONFIRM:-"--noconfirm"} +PM_INSTALL=${PM_INSTALL:--S} +PM_REMOVE=${PM_REMOVE:-R} +PM_UPDATE=${PM_UPDATE:--Sy} +PM_UPGRADE=${PM_UPGRADE:--Syyu} # SYS - System Options SYS_SUDO=${SYS_SUDO:-"sudo"} diff --git a/sync.sh b/sync.sh index 2b5f2f0..cff0c17 100755 --- a/sync.sh +++ b/sync.sh @@ -11,8 +11,9 @@ PULL_GIT=${PULL_GIT:-yes} set -e # Exit on error _install_pkgs() { + run $SYS_SUDO $PM_COMMAND $PM_UPDATE $PM_NOCONFIRM while read -r pkg; do - run $SYS_SUDO $PM_COMMAND $PM_INSTALL_ARG $PM_NOCONFIRM_ARG $pkg + run $SYS_SUDO $PM_COMMAND $PM_INSTALL $PM_NOCONFIRM $pkg done <$1 } @@ -58,5 +59,5 @@ main() { } echo "# exec: start." -time main "$@" +[ bool ${TIME_TRACK:-no} ] && time main "$@" || main "$@" echo "# exec: done."