From 897ef9cf25137b10e3046d59d2219601779a3413 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 15 Jan 2022 10:35:30 +0100 Subject: [PATCH] Fix shell scripts Replace `$_` by `$0` because `$_` doesn't work when using `sh upgrade.sh`. Replace `bash` by `sh` because we should not depend on bash. And also remove unused `CUR_DIR` variable. --- libsqlite3-sys/upgrade.sh | 5 ++--- libsqlite3-sys/upgrade_sqlcipher.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libsqlite3-sys/upgrade.sh b/libsqlite3-sys/upgrade.sh index ec41f32..34e6b5c 100755 --- a/libsqlite3-sys/upgrade.sh +++ b/libsqlite3-sys/upgrade.sh @@ -1,7 +1,6 @@ -#!/bin/bash -e +#!/bin/sh -e -SCRIPT_DIR=$(cd "$(dirname "$_")" && pwd) -CUR_DIR=$(pwd -P) +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) echo "$SCRIPT_DIR" cd "$SCRIPT_DIR" || { echo "fatal error" >&2; exit 1; } cargo clean diff --git a/libsqlite3-sys/upgrade_sqlcipher.sh b/libsqlite3-sys/upgrade_sqlcipher.sh index d087984..ecb5479 100755 --- a/libsqlite3-sys/upgrade_sqlcipher.sh +++ b/libsqlite3-sys/upgrade_sqlcipher.sh @@ -1,7 +1,6 @@ -#!/bin/bash -e +#!/bin/sh -e -SCRIPT_DIR=$(cd "$(dirname "$_")" && pwd) -CUR_DIR=$(pwd -P) +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) echo "$SCRIPT_DIR" cd "$SCRIPT_DIR" || { echo "fatal error" >&2; exit 1; } cargo clean