Skip to content

Commit

Permalink
script: fix function
Browse files Browse the repository at this point in the history
  • Loading branch information
rockavoldy committed Jul 6, 2023
1 parent a3a3b41 commit c4f4f5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/ooc-installer
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi
curl -LO "$asset_url" -o "$asset_name"
# wget "$asset_url" -O "$asset_name"

conditional_mv() {
function conditional_mv() {
[ -d "$2" ] || mkdir -p "$2" && mv "$1"/* "$2"
}

Expand All @@ -45,6 +45,8 @@ TMP_DIR=$(mktemp -d)
unzip "$asset_name" -d "$TMR_DIR"
sudo su
conditional_mv "$TMP_DIR/odoo-one-click" "/usr/local/bin/odoo-one-click"

rm -rf $TMP_DIR
chmod +x /usr/local/bin/odoo-one-click

if ! command -v odoo-one-click 1>/dev/null; then
Expand Down

0 comments on commit c4f4f5b

Please sign in to comment.