Bugfix: tput->printf; "patched" arg means patches already applied
This commit is contained in:
parent
090e7ec17a
commit
728cdab8a1
1 changed files with 9 additions and 7 deletions
16
build.sh
16
build.sh
|
@ -1,9 +1,6 @@
|
||||||
#!/usr/bin/env ash
|
#!/usr/bin/env ash
|
||||||
# shellcheck shell=dash
|
# shellcheck shell=dash
|
||||||
|
|
||||||
BOLD=$(tput bold)
|
|
||||||
RESET=$(tput sgr0)
|
|
||||||
|
|
||||||
WORKDIR=$(pwd)
|
WORKDIR=$(pwd)
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,8 +27,8 @@ try_exec () {
|
||||||
}
|
}
|
||||||
|
|
||||||
title () {
|
title () {
|
||||||
echo
|
# Newline, Bold text, $1, Normal text, Newline
|
||||||
echo "$BOLD$1$RESET"
|
printf '\n\033[1m%s\033[0m\n' "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,8 +44,13 @@ title 'Cloning repositories...'
|
||||||
[ -e reqwest4j ] || clone https://github.com/TeamPiped/reqwest4j reqwest4j
|
[ -e reqwest4j ] || clone https://github.com/TeamPiped/reqwest4j reqwest4j
|
||||||
|
|
||||||
title 'Applying patches...'
|
title 'Applying patches...'
|
||||||
cd_and_exec backend git apply ../backend.patch
|
echo "Hint: if you've already applied patches,"
|
||||||
cd_and_exec reqwest4j git apply ../reqwest4j.patch
|
echo "pass \"patched\" as the first argument to the script."
|
||||||
|
if [ "$1" != "patched" ]
|
||||||
|
then
|
||||||
|
cd_and_exec backend git apply ../backend.patch
|
||||||
|
cd_and_exec reqwest4j git apply ../reqwest4j.patch
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
|
|
Loading…
Add table
Reference in a new issue