Skip to content

Commit 5c1b612

Browse files
Merge pull request Sneeds-Feed-and-Seed#51 from BasedRimuru/master
Sneedfy
2 parents ba19bee + 15ca70b commit 5c1b612

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

scripts/sneedfy.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
set -e
3+
4+
if [ ! "$#" -eq 2 ]; then
5+
printf '%s\n' "usage: $0 fork commit_id"
6+
printf '%s\n' "Sneedfies audacity's botnet code"
7+
printf '\n'
8+
printf '%s\n' "fork is the USER on https://github.com/USER/sneedacity"
9+
printf '%s\n' "commit_id is the latest commit merged from audacity"
10+
exit 1
11+
fi
12+
13+
fork="$1" commit="$2"
14+
if [ ! -d audacity ]; then
15+
git clone "https://github.com/audacity/audacity"
16+
else
17+
cd audacity; git pull; cd ..
18+
fi
19+
if [ ! -d sneedacity ]; then
20+
git clone "https://github.com/$fork/sneedacity"
21+
else
22+
cd sneedacity; git pull; cd ..
23+
fi
24+
25+
cd audacity
26+
git format-patch "$commit"
27+
mv *.patch ../sneedacity
28+
cd ..
29+
30+
cd sneedacity
31+
sed -i 's/audacity/sneedacity/g;
32+
s/AUDACITY/SNEEDACITY/g;
33+
s/Audacity/Sneedacity/g' *.patch
34+
git am *.patch
35+
rm *.patch
36+
37+
echo "Done! Don't forget to test it before pushing and making a PR"

0 commit comments

Comments
 (0)