diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-03-26 10:00:45 +0100 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-03-26 10:00:45 +0100 |
| commit | 6abd77290c1f62564ed3c3c260c235742a8ae518 (patch) | |
| tree | 6e45104bd5480c58fe580f51fb2e671a864867ec /apply_patches.sh | |
| parent | 53dbfbccea07f659aff5d03c5a5d44c729f71ca7 (diff) | |
feat: wownero support
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" |
