From 6abd77290c1f62564ed3c3c260c235742a8ae518 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 26 Mar 2024 10:00:45 +0100 Subject: feat: wownero support --- apply_patches.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'apply_patches.sh') 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" -- cgit v1.2.3