Skip to content

Commit

Permalink
Add reinstall subcommand to scripts/app (#105)
Browse files Browse the repository at this point in the history
Change output of version number

Co-authored-by: Steven Briscoe <me@stevenbriscoe.com>
  • Loading branch information
nevets963 and Steven Briscoe authored Sep 14, 2022
1 parent d00a44a commit 6bb3697
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
17 changes: 14 additions & 3 deletions scripts/app
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail

VERSION="0.0.3"

UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)"
USER_FILE="${UMBREL_ROOT}/db/user.json"
ACTIVE_APP_REPO_PATH=$($UMBREL_ROOT/scripts/repo path)

show_help() {
cat << EOF
app 0.0.2
CLI for managing Umbrel apps
CLI (v${VERSION}) for managing Umbrel apps
Usage: app <command> <app> [<arguments>]
Commands:
install Pulls down images for an app and starts it
uninstall Removes images and destroys all data for an app
reinstall Calls 'uninstall', followed by 'install' for an app
stop Stops an installed app
start Starts an installed app
restart Restarts an installed app
Expand Down Expand Up @@ -410,6 +411,16 @@ if [[ "$command" = "stop" ]]; then
exit
fi

if [[ "$command" = "reinstall" ]]; then

"${0}" "uninstall" "${app}"

echo
"${0}" "install" "${app}"

exit
fi

# Starts an installed app
if [[ "$command" = "start" ]]; then

Expand Down
7 changes: 4 additions & 3 deletions scripts/repo
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail

VERSION="0.0.2"

UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)"
USER_FILE="${UMBREL_ROOT}/db/user.json"
DEFAULT_UMBREL_APP_REPO_URL="https://github.com/getumbrel/umbrel-apps.git"

show_help() {
cat << EOF
repo 0.0.2
CLI for managing local Umbrel App Repos
CLI (v${VERSION}) for managing local Umbrel App Repos
Usage: repo <command> <arguments...>
Expand Down Expand Up @@ -213,6 +213,7 @@ fi

if [[ "$command" = "default-repo" ]]; then
echo "${DEFAULT_UMBREL_APP_REPO_URL}"

exit
fi

Expand Down

0 comments on commit 6bb3697

Please sign in to comment.