mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 10:35:42 +01:00
fix 2?
This commit is contained in:
parent
0e7bce1094
commit
c604b67764
@ -14,7 +14,7 @@ git config commit.gpgsign false
|
||||
cd $1/patches/$2
|
||||
for D in ${searchtxts[@]}; do
|
||||
echo "IMPORTANT:!!! $D"
|
||||
if [ true ]; then
|
||||
if [ -d $1/patches/$2/$dnoslashlower ]; then
|
||||
echo $D
|
||||
dnoslash=$D
|
||||
echo "DnoS: $dnoslash"
|
||||
|
@ -12,38 +12,40 @@ for D in */; do
|
||||
if [[ $dnoslash != "api" ]]; then
|
||||
echo "Found $dnoslash directory!"
|
||||
for file in ${searchtxts[@]}; do
|
||||
i=0
|
||||
rm -rf -f "$1/patches/$dnoslash/$file/"
|
||||
echo "Looking for $file file!"
|
||||
echo "$(cat $patchdir/$dnoslash/$file.txt)"
|
||||
IFS='&'
|
||||
read -ra ADDR <<< $(cat $patchdir/$dnoslash/$file.txt)
|
||||
for patch in ${ADDR[@]}; do
|
||||
echo "Found $patch in $file!"
|
||||
echo $1/$dnoslash/patches/$file
|
||||
for filename in $1/$dnoslash/patches/$file/*.patch; do
|
||||
filenamend="${filename##*/}"
|
||||
filenamens=${filenamend%/*}
|
||||
#filenameedited=${filenamens%.*} # retain the part before the period
|
||||
filenameedited=${filenamens::-6}
|
||||
#echo $filenameedited
|
||||
filenameedited=${filenameedited:5} # retain the part after the frist slash
|
||||
if [[ $filenameedited == $patch ]]; then
|
||||
echo "Found Matching file!"
|
||||
if [[ $i == 0 ]]; then
|
||||
echo "Making $file dir in $dnoslash patch dir"
|
||||
mkdir $1/patches/$dnoslash/$file
|
||||
if [ -f "$1/patches/$dnoslash/$file.txt" ]; then
|
||||
i=0
|
||||
rm -rf -f "$1/patches/$dnoslash/$file/"
|
||||
echo "Looking for $file file!"
|
||||
echo "$(cat $patchdir/$dnoslash/$file.txt)"
|
||||
IFS='&'
|
||||
read -ra ADDR <<< $(cat $patchdir/$dnoslash/$file.txt)
|
||||
for patch in ${ADDR[@]}; do
|
||||
echo "Found $patch in $file!"
|
||||
echo $1/$dnoslash/patches/$file
|
||||
for filename in $1/$dnoslash/patches/$file/*.patch; do
|
||||
filenamend="${filename##*/}"
|
||||
filenamens=${filenamend%/*}
|
||||
#filenameedited=${filenamens%.*} # retain the part before the period
|
||||
filenameedited=${filenamens::-6}
|
||||
#echo $filenameedited
|
||||
filenameedited=${filenameedited:5} # retain the part after the frist slash
|
||||
if [[ $filenameedited == $patch ]]; then
|
||||
echo "Found Matching file!"
|
||||
if [[ $i == 0 ]]; then
|
||||
echo "Making $file dir in $dnoslash patch dir"
|
||||
mkdir $1/patches/$dnoslash/$file
|
||||
fi
|
||||
((i=i+1))
|
||||
printf -v num "%04d" $i
|
||||
echo "Making ${num}-${patch}.patch file for Yatopia"
|
||||
cp $1/$dnoslash/patches/$file/$filenamens $1/patches/$dnoslash/$file/"${num}-${patch}.patch"
|
||||
fi
|
||||
((i=i+1))
|
||||
printf -v num "%04d" $i
|
||||
echo "Making ${num}-${patch}.patch file for Yatopia"
|
||||
cp $1/$dnoslash/patches/$file/$filenamens $1/patches/$dnoslash/$file/"${num}-${patch}.patch"
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=' '
|
||||
done
|
||||
IFS=' '
|
||||
done
|
||||
$1/scripts/applyUpstream.sh $1 $dnoslash || exit 1
|
||||
$1/scripts/applyUpstream.sh $1 $dnoslash || exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user