Begin all Bash scripts with "cd $(dirname $0)".

This commit is contained in:
levlam 2021-12-08 19:43:21 +03:00
parent 85d6ef98c3
commit 5a22865f7c
8 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
git clone https://github.com/beeware/Python-Apple-support
cd Python-Apple-support

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
td_path=$(grealpath ../..)
rm -rf build

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
emconfigure true 2> /dev/null || { echo 'emconfigure not found. Install emsdk and add emconfigure and emmake to PATH environment variable. See instruction at https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html. Do not forget to add `emconfigure` and `emmake` to the PATH environment variable via `emsdk/emsdk_env.sh` script.'; exit 1; }

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
emcmake true 2> /dev/null || { echo 'emcmake not found. Install emsdk and add emcmake and emmake to PATH environment variable. See instruction at https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html. Do not forget to add `emcmake` and `emmake` to the PATH environment variable via `emsdk/emsdk_env.sh` script.'; exit 1; }

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
cd tdweb || exit 1
npm install --no-save || exit 1

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
DEST=tdweb/src/prebuilt/release/
mkdir -p $DEST || exit 1

View File

@ -1,2 +1,3 @@
#!/bin/sh
cd $(dirname $0)
./src.sh | grep -v CxCli.h | grep -iv dotnet | grep -v /tl-parser/ | xargs -n 1 clang-format -verbose -style=file -i

View File

@ -1,4 +1,5 @@
#!/bin/sh
cd $(dirname $0)
commit=$(git rev-parse HEAD)
git diff-index --quiet HEAD
dirty=$?