Commit 0c841b84 authored by PoroCYon's avatar PoroCYon
Browse files

fixed update

parent 9730f59f
......@@ -33,9 +33,9 @@ update_package() {
return 0
}
upgrade_package() {
exec_subcommand configure "$1"
exec_subcommand build "$1"
exec_subcommand install "$1"
exec_subcommand pkgcmd config "$1"
exec_subcommand pkgcmd build "$1"
exec_subcommand strace "$1"
}
upgrade_pkgs() {
# TODO: speed this up, maybe by parallellising this?
......@@ -46,10 +46,10 @@ upgrade_pkgs() {
}
update_selection() {
touch /tmp/upgrade-list
touch /tmp/upgrade_list
local ALLARGS=("$@")
for pkg in "${ALLARGS[@]}"; do
for PKG in "${ALLARGS[@]}"; do
if ! update_package "$PKG" ""; then
echo "$PKG" >> /tmp/upgrade_list
fi
......@@ -59,11 +59,11 @@ update_selection() {
}
update_all() {
touch /tmp/upgrade-list
touch /tmp/upgrade_list
while read -r PKG_AND_VER; do
local PKG=$(echo "$PKG_AND_VER" | grep -E -o "^[A-Za-z0-9_\-\.]")
local BEFORE=$(echo "$PKG_AND_VER" | grep -E -o "[A-Za-z0-9_\-\.]$")
local PKG=$(echo "$PKG_AND_VER" | grep -E -o "^[A-Za-z0-9_\-\.]*")
local BEFORE=$(echo "$PKG_AND_VER" | grep -E -o "[A-Za-z0-9_\-\.]*$")
if ! update_package "$PKG" "$BEFORE"; then
echo "$PKG" >> /tmp/upgrade_list
......
Supports Markdown
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