Skip to content

Commit

Permalink
fix upgrade messages
Browse files Browse the repository at this point in the history
  • Loading branch information
niaow committed Nov 8, 2017
1 parent fb1ff20 commit 836d4e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion inst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ fail() {
exit "$2"
}

infoval() {
(
. "$1"
local val="$2"
eval "echo \$$val"
) || return $?
}

if [ $# -ne 1 ]; then
echo "Usage: $0 PKGFILE"
fail "Wrong number of arguments"
Expand Down Expand Up @@ -69,7 +77,7 @@ scanlists() {
# check if an old version is installed
if [ -e "$dbd" ]; then
update=1
echo "Replacing $NAME-$(cat "$dbd/version") with $NAME-$VERSION"
echo "Replacing $NAME-$(infoval "$dbd/pkginfo.sh" VERSION) with $NAME-$VERSION"

tdel=$(scanlists | grep -xFvf - "$tmpdir/.files.list")
if [ $? -gt 1 ]; then
Expand Down

0 comments on commit 836d4e8

Please sign in to comment.