Skip to content

Commit

Permalink
Merge pull request #21 from zenodeapp/genesis-v1.0.0
Browse files Browse the repository at this point in the history
Replace sh with bash when calling dependencies.sh due to sourcing of ~/.bashrc
  • Loading branch information
zenodeapp authored Jan 18, 2024
2 parents 41ecd0b + a2ae2a5 commit 3789ef2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

This script installs all the dependencies (and system configurations) that are necessary for the binary to run. Since this file already gets called from within the other scripts, it is not required to call this yourself.

> [!WARNING]
> Running this script has to be done with `bash`, as the sourcing of the _~/.bashrc_-file may lead to implications if it's run with `sh`.
## upgrade.sh

> [!WARNING]
Expand Down
3 changes: 3 additions & 0 deletions setup/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# This should be run with 'bash', as the sourcing of the .bashrc file may lead to implications
# if it's run with 'sh'.

# Helper-function: adds a line to a file if it doesn't already exist (to prevent duplicates)
add_line_to_file() {
local line="$1"
Expand Down
2 changes: 1 addition & 1 deletion setup/state-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ systemctl stop $BINARY_NAME
cd $REPO_ROOT

# System update and installation of dependencies
sh ./setup/dependencies.sh
bash ./setup/dependencies.sh

# Building binaries
go mod tidy
Expand Down
2 changes: 1 addition & 1 deletion setup/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ systemctl stop $BINARY_NAME
cd $REPO_ROOT

# System update and installation of dependencies
sh ./setup/dependencies.sh
bash ./setup/dependencies.sh

# Create a backup of old config files
cp $CONFIG_DIR/app.toml $CONFIG_DIR/app.toml.bak
Expand Down

0 comments on commit 3789ef2

Please sign in to comment.