Skip to content

Commit fc19b3f

Browse files
committed
fix: Hacks to make application work again
1 parent bfba9d9 commit fc19b3f

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

basalt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ authors = ['Edwin Kofler <edwin@kofler.dev>']
66
description = ''
77

88
[run]
9-
dependencies = ['hyperupcall/bash-args@v0.8.0']
9+
dependencies = ['hyperupcall/bash-args@e5466e6c3998790ebd99768cf0f910e161b84a95']
1010
binDirs = ['pkg/bin']
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/edwin/.local/share/basalt/store/packages/github.com/hyperupcall/bash-args@e5466e6c3998790ebd99768cf0f910e161b84a95

pkg/bin/choose

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ fi
5959

6060
# shellcheck disable=SC1091
6161
source "$PROGRAM_LIB_DIR/cmd/choose.sh"
62+
choose.main "$@"

pkg/lib/cmd/choose.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@
33
# async issues with +u when sourcing
44
set -Eeo pipefail
55

6+
eval "$(basalt-package-init)"; basalt.package-init
7+
basalt.package-load
8+
69
# ------------------------- start ------------------------ #
710
source "$PROGRAM_LIB_DIR/do.sh"
811
source "$PROGRAM_LIB_DIR/helper.sh"
912
source "$PROGRAM_LIB_DIR/plumbing.sh"
1013
source "$PROGRAM_LIB_DIR/util.sh"
11-
PATH="$PROGRAM_LIB_DIR/../../bpm_packages/bin:$PATH" # TODO
14+
15+
for f in "$PROGRAM_LIB_DIR"/../../basalt_packages/packages/github.com/hyperupcall/bash-args@*/pkg/{lib/util,source}/*.sh; do
16+
source "$f"
17+
done
1218

1319
db_dir="${CHOOSE_DB_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/choose/db}"
1420

15-
main() {
21+
choose.main() {
1622
declare -A args=()
1723
declare -a argsCommands=()
1824

1925
# shellcheck disable=SC1091
20-
source bash-args parse "$@" <<-"EOF"
26+
bash-args parse "$@" <<-"EOF"
2127
@arg launch - (category) Launches the default program in a particular category
2228
@arg set - (category) (application) Sets the default program in a particular category
2329
@flag [gui] - Whether to open a GUI
@@ -53,5 +59,3 @@ main() {
5359
log.die "Subcommand '${argsCommands[0]}' not found"
5460
esac
5561
}
56-
57-
main "$@"

0 commit comments

Comments
 (0)