Skip to content

Commit

Permalink
(#101) Fix some scripts missing __apps.sh sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Oct 13, 2024
1 parent 9eb993d commit ad11d88
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 8 deletions.
3 changes: 3 additions & 0 deletions repair
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ suibase_repair() {
trap cleanup EXIT
fi

# shellcheck source=SCRIPTDIR/scripts/common/__apps.sh
source "$REPAIR_SB_DIR/scripts/common/__apps.sh"

if [ -z "$SUIBASE_DAEMON_VERSION_FILE" ]; then
# shellcheck source=SCRIPTDIR/scripts/common/__suibase-daemon.sh
source "$REPAIR_SB_DIR/scripts/common/__suibase-daemon.sh"
Expand Down
3 changes: 3 additions & 0 deletions restart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ main() {
source "$SUIBASE_DIR/scripts/common/__globals.sh" "$SCRIPT_COMMON_CALLER" "$WORKDIR"
trap cleanup EXIT

# shellcheck source=SCRIPTDIR/scripts/common/__apps.sh
source "$SUIBASE_DIR/scripts/common/__apps.sh"

# shellcheck source=SCRIPTDIR/scripts/common/__suibase-daemon.sh
source "$SUIBASE_DIR/scripts/common/__suibase-daemon.sh"

Expand Down
2 changes: 0 additions & 2 deletions scripts/common/__apps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash

# shellcheck shell=bash

# You must source __globals.sh before __apps.sh
Expand Down
3 changes: 3 additions & 0 deletions scripts/common/run-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ WORKDIR="localnet"
source "$SUIBASE_DIR/scripts/common/__globals.sh" "$SCRIPT_COMMON_CALLER" "$WORKDIR"
trap cleanup EXIT

# shellcheck source=SCRIPTDIR/__apps.sh
source "$SUIBASE_DIR/scripts/common/__apps.sh"

# Switch case on $1 being "suibase" or "dtp".
case "$PARAM_NAME" in
"suibase")
Expand Down
1 change: 1 addition & 0 deletions scripts/common/show-fds.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
for dir in /proc/*/fd;
do
echo -n "$dir "; #need a space to get real columns for the sort
Expand Down
3 changes: 3 additions & 0 deletions scripts/common/verify-suibase-daemon-lock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ fi
source "$SUIBASE_DIR/scripts/common/__globals.sh" "$SCRIPT_COMMON_CALLER" "$WORKDIR"
trap cleanup EXIT

# shellcheck source=SCRIPTDIR/__apps.sh
source "$SUIBASE_DIR/scripts/common/__apps.sh"

# shellcheck source=SCRIPTDIR/__suibase-daemon.sh
source "$SUIBASE_DIR/scripts/common/__suibase-daemon.sh"

Expand Down
7 changes: 5 additions & 2 deletions scripts/dev/start-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
SUIBASE_DIR="$HOME/suibase"
WORKDIR="none"

# shellcheck source=SCRIPTDIR/../common/__suibase-daemon.sh
# shellcheck source=SCRIPTDIR/../common/__globals.sh
source "$SUIBASE_DIR/scripts/common/__globals.sh" "$SCRIPT_COMMON_CALLER" "$WORKDIR"
trap cleanup EXIT

# shellcheck source=SCRIPTDIR/../common/__globals.sh
# shellcheck source=SCRIPTDIR/../common/__apps.sh
source "$SUIBASE_DIR/scripts/common/__apps.sh"

# shellcheck source=SCRIPTDIR/../common/__suibase-daemon.sh
source "$SUIBASE_DIR/scripts/common/__suibase-daemon.sh"

cli_mutex_lock "suibase_daemon"
Expand Down
8 changes: 6 additions & 2 deletions scripts/dev/stop-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
SUIBASE_DIR="$HOME/suibase"
WORKDIR="none"

# shellcheck source=SCRIPTDIR/../common/__suibase-daemon.sh

# shellcheck source=SCRIPTDIR/../common/__globals.sh
source "$SUIBASE_DIR/scripts/common/__globals.sh" "$SCRIPT_COMMON_CALLER" "$WORKDIR"
trap cleanup EXIT

# shellcheck source=SCRIPTDIR/../common/__globals.sh
# shellcheck source=SCRIPTDIR/../common/__apps.sh
source "$SUIBASE_DIR/scripts/common/__apps.sh"

# shellcheck source=SCRIPTDIR/../common/__suibase-daemon.sh
source "$SUIBASE_DIR/scripts/common/__suibase-daemon.sh"

cli_mutex_lock "suibase_daemon"
Expand Down
7 changes: 5 additions & 2 deletions scripts/dev/update-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
SUIBASE_DIR="$HOME/suibase"
WORKDIR="none"

# shellcheck source=SCRIPTDIR/../common/__suibase-daemon.sh
# shellcheck source=SCRIPTDIR/../common/__globals.sh
source "$SUIBASE_DIR/scripts/common/__globals.sh" "$SCRIPT_COMMON_CALLER" "$WORKDIR"
trap cleanup EXIT

# shellcheck source=SCRIPTDIR/../common/__globals.sh
# shellcheck source=SCRIPTDIR/../common/__apps.sh
source "$SUIBASE_DIR/scripts/common/__apps.sh"

# shellcheck source=SCRIPTDIR/../common/__suibase-daemon.sh
source "$SUIBASE_DIR/scripts/common/__suibase-daemon.sh"

cli_mutex_lock "suibase_daemon"
Expand Down

0 comments on commit ad11d88

Please sign in to comment.