Commit 29e841f7 authored by pcy's avatar pcy
Browse files

fixes

parent 04ef34db
......@@ -165,7 +165,7 @@ sspt_build() {
makepkg -e
}
sspt_install() {
makepkg -e -o -i
makepkg -i --noconfirm && rm *.pkg.tar.xz
}
sspt_clean() {
makepkg -c -e -o
......
......@@ -22,11 +22,11 @@ read_pkg_version() {
update_package() {
local PKG="$1"
local BEFORE="$(read_pkg_version "$1")"
exec_subcommand pkgcmd pull "$PKG" || exit 1
exec_subcommand pkgcmd pull "$PKG" || return 2
local AFTER="$(exec_subcommand pkgcmd version "$PKG")"
if [ "$BEFORE" != "$AFTER" ]; then
exec_subcommand src-db reg "$PKG" "$AFTER" || exit 1
exec_subcommand src-db reg "$PKG" "$AFTER" || return 2
return 1
fi
......@@ -59,14 +59,33 @@ upgrade_pkgs() {
}
update_selection() {
local ERRORS=""
local ALLARGS=("$@")
for PKG in "${ALLARGS[@]}"; do
echo -n "$PKG: "
if ! update_package "$PKG"; then
update_package "$PKG"
local RETV="$?"
if [ "$RETV" = "2" ]; then
if [ -z "$ERRORS" ]; then
ERRORS="$PKG"
else
ERRORS="$ERRORS, $PKG"
fi
elif [ "$ERTV" = "1" ]; then
echo "$PKG" >> /tmp/upgrade_list
fi
done
if ! [ -z "$ERRORS" ]; then
(>&2 echo "Failed to update the following packages: $ERRORS\n" \
"Press any key to continue.")
local FOOBAR=""
read -r FOOBAR
unset FOOBAR
fi
upgrade_pkgs
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment