diff options
Diffstat (limited to 'apply_patches.sh')
| -rwxr-xr-x | apply_patches.sh | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/apply_patches.sh b/apply_patches.sh index 2b2057b..67f0b2f 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -1,22 +1,36 @@ #!/bin/bash +repo="$1" -if [[ ! -d 'monero' ]] +if [[ "x$repo" == "x" ]]; then - echo "no 'monero' directory found. clone with --recursive or run:" + echo "Usage: $0 monero/wownero" + exit 1 +fi + +if [[ "x$repo" != "xwownero" && "x$repo" != "xmonero" ]]; +then + echo "Usage: $0 monero/wownero" + echo "Invalid target given, only monero and wownero are supported targets" +fi + +if [[ ! -d "$repo" ]] +then + echo "no '$repo' directory found. clone with --recursive or run:" echo "$ git submodule init && git submodule update --force"; exit 1 fi -if [[ -f "monero/.patch-applied" ]]; +if [[ -f "$repo/.patch-applied" ]]; then - echo "monero/.patch-applied file exist. manual investigation recommended." + echo "$repo/.patch-applied file exist. manual investigation recommended." exit 0 fi -cd monero -git apply ../patches/monero/* --index +set -e +cd $repo +git apply ../patches/$repo/*.patch --index git submodule init -git submodule update --force +git submodule update --init --recursive --force touch .patch-applied git add . git config user.email "you@example.com" |
