Skip to content

Commit

Permalink
chore: remove unused upgrade steps
Browse files Browse the repository at this point in the history
  • Loading branch information
wbollock committed Sep 25, 2022
1 parent 9554c7d commit 01fcf4d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions nfpm/scripts/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,17 @@ cleanInstall() {
fi
}

# upgrade() {
# # Step 3(upgrade), do what you need
# # TODO - do I need upgrade steps?
# }

# Step 2, check if this is a clean install or an upgrade
# Step 2, check if this is a clean install
action="$1"
if [ "$1" = "configure" ] && [ -z "$2" ]; then
# Alpine linux does not pass args, and deb passes $1=configure
action="install"
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
# deb passes $1=configure $2=<current version>
action="upgrade"
fi

case "$action" in
"1" | "install")
cleanInstall
;;
"2" | "upgrade")
upgrade
;;
*)
cleanInstall
;;
Expand Down

0 comments on commit 01fcf4d

Please sign in to comment.