Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make scripts POSIX compliant #45

Merged
merged 1 commit into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion script/atlas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

BINDIR="$(git rev-parse --show-toplevel)"/bin
BINARY=$BINDIR/atlas
Expand Down
4 changes: 2 additions & 2 deletions script/install-libtensorflow
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# This script downloads and installs libtensorflow (CPU only) for the current platform.
# If you are on macOS, you can just use `brew install libtensorflow` instead.
Expand All @@ -13,7 +13,7 @@ fi

OS=$(uname -s | tr '[:upper:]' '[:lower:]')

function maybe_sudo() {
maybe_sudo() {
if [ "$(id -u)" -ne 0 ]; then
sudo "$@"
else
Expand Down
2 changes: 1 addition & 1 deletion script/lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

BINDIR="$(git rev-parse --show-toplevel)"/bin
BINARY=$BINDIR/golangci-lint
Expand Down
6 changes: 2 additions & 4 deletions script/record-tape
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash
#!/bin/sh

TAPEDIR="$(git rev-parse --show-toplevel)"/docs/tapes

if ! command -v vhs &> /dev/null
then
if ! command -v vhs >/dev/null 2>&1; then
echo "vhs not be found, please install it:"
echo "https://github.com/charmbracelet/vhs#installation"
exit 1
Expand All @@ -14,7 +13,6 @@ if [ $# -gt 0 ]; then
for tape in "$@"; do
vhs "$TAPEDIR/$tape".tape -o "$TAPEDIR"/"$tape".gif
done
exit
else
echo "specify a tape name to record"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion script/schema-diff
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

TOPDIR="$(git rev-parse --show-toplevel)"
SCRIPTDIR="$TOPDIR"/script
Expand Down
2 changes: 1 addition & 1 deletion script/ssh-tmp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Create a temporary SSH key and connect to a remote host with it.

if [ $# -eq 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion script/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

BINDIR="$(git rev-parse --show-toplevel)"/bin
BINARY=$BINDIR/gotestsum
Expand Down
Loading