Files
monero_c/apply_patches.sh

41 lines
914 B
Bash
Raw Normal View History

#!/bin/bash
2024-03-26 10:00:45 +01:00
repo="$1"
2024-03-26 10:00:45 +01:00
if [[ "x$repo" == "x" ]];
then
2024-03-26 10:00:45 +01:00
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
2024-03-26 10:00:45 +01:00
if [[ -f "$repo/.patch-applied" ]];
then
2024-03-26 10:00:45 +01:00
echo "$repo/.patch-applied file exist. manual investigation recommended."
exit 0
fi
2024-03-26 10:00:45 +01:00
set -e
cd $repo
git am ../patches/$repo/*.patch
if [[ "$repo" == "wownero" ]];
then
pushd external/randomwow
git remote set-url origin https://github.com/mrcyjanek/randomwow.git
popd
fi
git submodule init
2024-03-26 10:00:45 +01:00
git submodule update --init --recursive --force
touch .patch-applied
echo "you are good to go!"