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