Skip to content

Commit a232f39

Browse files
ianbenzGregAC
authored andcommitted
Fix load_demo_system.sh shebang and shell compliance
BASH_SOURCE is unset on systems with a POSIX-compatible /bin/sh, including Ubuntu.
1 parent 4ea1060 commit a232f39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/load_demo_system.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
#!/bin/sh
12
# Copyright lowRISC contributors.
23
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
34
# SPDX-License-Identifier: Apache-2.0
4-
#!/bin/sh
55

66
if [ $# -ne 2 ]; then
77
echo "Usage $0 run|halt elf_file"
@@ -24,7 +24,7 @@ if [ $1 = "run" ]; then
2424
EXIT_CMD='-c "exit"'
2525
fi
2626

27-
SCRIPT_DIR="$(dirname "$(readlink -e "$BASH_SOURCE")")"
27+
SCRIPT_DIR="$(dirname "$(readlink -e "$0")")"
2828

2929
openocd -f $SCRIPT_DIR/arty-a7-openocd-cfg.tcl -c "load_image $2 0x0" \
3030
-c "verify_image $2 0x0" \

0 commit comments

Comments
 (0)