Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
7.4.0 : remove support for BAZ_LOADER_PROG_BIN and DESTDIR
Browse files Browse the repository at this point in the history
Signed-off-by: Ari Archer <[email protected]>
  • Loading branch information
Ari Archer committed Mar 1, 2023
1 parent 34f621d commit c56142c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,6 @@ export STRIP='llvm-strip'
export STRIPFLAGS='--remove-section=.note --strip-all'
```

- set the `load` binary path

```bash
export BAZ_LOADER_PROG_BIN='/some/load'
```

- set the `load` binary path destination

```bash
export DESTDIR='/some/dir/'
```

- install the script anywhere, or even run it standalone
- running standalone means just running it
- installing could be done in for example `/usr/local/bin`:
Expand Down
12 changes: 4 additions & 8 deletions baz
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ "$BAZ_DEBUG" ] && set -x

export BAZ_VERSION='7.3.0'
export BAZ_VERSION='7.4.0'
export BAZ_DIR="$HOME/.local/share/baz"
export BAZ_CONFDIR="$HOME/.config/baz"
export BAZ_CONF="$BAZ_CONFDIR/config.env"
Expand All @@ -28,7 +28,7 @@ export BAZ_BASH_LOADER_TEMPLATE="$BAZP_INITDIR/loader.sht"
export BAZ_LOADER_DIR="$BAZP_INITDIR/loader"
export BAZ_LOADER_TEMPLATE="$BAZ_LOADER_DIR/loader.sht"
export BAZ_LOADER_PROG="$BAZ_LOADER_DIR/loader.c"
export BAZ_LOADER_PROG_BIN="${BAZ_LOADER_PROG_BIN:-"$BAZ_DIR/load"}"
export BAZ_LOADER_PROG_BIN="$BAZ_DIR/load"

export BAZ_LOGGING_HEADER='[BAZ_LOAD]'

Expand Down Expand Up @@ -629,15 +629,11 @@ baz_setup() {
baz_log "compiling loader $(baz_unexpand_path "$BAZ_LOADER_PROG_BIN") ... " printf
if [ "$DESTDIR" ]; then
mkdir -p -- "$DESTDIR" || baz_eecho 'failed to make destdir'
fi
# shellcheck disable=SC2086
if "$CC" $CFLAGS "$BAZ_LOADER_PROG" $([ "$BAZ_LOGGING_ENABLED" ] && echo "-D LOGGING=\"\\\"$BAZ_LOGGING_HEADER\\\"\"") -o "$DESTDIR$BAZ_LOADER_PROG_BIN"; then
if "$CC" $CFLAGS "$BAZ_LOADER_PROG" $([ "$BAZ_LOGGING_ENABLED" ] && echo "-D LOGGING=\"\\\"$BAZ_LOGGING_HEADER\\\"\"") -o "$BAZ_LOADER_PROG_BIN"; then
if [ "$STRIP" ] && do_error=no baz_use "$STRIP"; then
# shellcheck disable=SC2086
"$STRIP" $STRIPFLAGS "$DESTDIR$BAZ_LOADER_PROG_BIN" || baz_eecho 'stripping failed'
"$STRIP" $STRIPFLAGS "$BAZ_LOADER_PROG_BIN" || baz_eecho 'stripping failed'
fi
baz_eecho 'done'
Expand Down

0 comments on commit c56142c

Please sign in to comment.