Last pre-release snapshot (20:35.01.10.2021 eu/pl)
This commit is contained in:
parent
19838ae794
commit
bbd1bec527
1 changed files with 25 additions and 6 deletions
31
aps
31
aps
|
@ -186,6 +186,27 @@ install_package_from_repo() { # NOTE(hippoz): This can get a tad confusing... ${
|
||||||
[ ! -d "${locpkg_database}/${1}/${2}" ] && err "Target not found."
|
[ ! -d "${locpkg_database}/${1}/${2}" ] && err "Target not found."
|
||||||
install_local_package "${locpkg_database}/${1}/${2}"
|
install_local_package "${locpkg_database}/${1}/${2}"
|
||||||
}
|
}
|
||||||
|
update() {
|
||||||
|
prn "Upgrading installed packages"
|
||||||
|
cd "${installed_pkg_database}" || err "Could not enter local installed package database directory. Exiting..."
|
||||||
|
for pkg in */; do
|
||||||
|
installed_pkg_path="${installed_pkg_database}/${pkg}"
|
||||||
|
. "${installed_pkg_path}/package"
|
||||||
|
pkg_name="${installed_pkg_path%/}"
|
||||||
|
pkg_name="${pkg_name##*/}"
|
||||||
|
already_installed_version=${pkg_config_ver}
|
||||||
|
[ ! -d "${locpkg_database}/${1}/${pkg_name}" ] && die "Package ${pkg_name} was not found in ${1}. Exiting..."
|
||||||
|
. "${locpkg_database}/${1}/${pkg_name}/package"
|
||||||
|
if [ ! "${already_installed_version}" = "${pkg_config_ver}" ]; then
|
||||||
|
echo ":: Updating package ${pkg_name} (out of date)"
|
||||||
|
install_package_from_repo "${1}" "${pkg_name}"
|
||||||
|
fi
|
||||||
|
unset pkg_config_deploy
|
||||||
|
unset pkg_config_ver
|
||||||
|
unset pkg_config_makedepends
|
||||||
|
unset pkg_config_depends
|
||||||
|
done
|
||||||
|
}
|
||||||
function help(){
|
function help(){
|
||||||
prn "h|help) prints this message"
|
prn "h|help) prints this message"
|
||||||
prn "v|version) version"
|
prn "v|version) version"
|
||||||
|
@ -199,13 +220,11 @@ function version(){
|
||||||
function main(){
|
function main(){
|
||||||
dbg
|
dbg
|
||||||
case $1 in
|
case $1 in
|
||||||
s|sync) err "This feature is currently disabled in APS" ;;
|
s|sync) sync_local_repo_database "official" ${official}
|
||||||
#s|sync) sync_local_repo_database "official" ${official}
|
[ -z "${2}" ] && exit 0
|
||||||
# [ -z "${2}" ] && exit 0
|
install_package_from_repo "official" "${2}" ;;
|
||||||
# install_package_from_repo "official" "${2}" ;;
|
|
||||||
i|install) pkg_local ${*: -1} ;;
|
i|install) pkg_local ${*: -1} ;;
|
||||||
#u|update) update ;;
|
u|update) update ;;
|
||||||
u|update) err "This feature is currently disabled in APS" ;;
|
|
||||||
v|version) version ;;
|
v|version) version ;;
|
||||||
h|help) help ;;
|
h|help) help ;;
|
||||||
*) err "Invalid option"
|
*) err "Invalid option"
|
||||||
|
|
Loading…
Reference in a new issue