Skip to content

Instantly share code, notes, and snippets.

@em92
Created March 22, 2022 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save em92/d4e1a9ec27d4eb16e6e287272aacc652 to your computer and use it in GitHub Desktop.
Save em92/d4e1a9ec27d4eb16e6e287272aacc652 to your computer and use it in GitHub Desktop.
pull.sh
#!/usr/bin/env bash
set +x
PR=$1
CLONE_DIR=./pr$PR
rm test
ln -s $CLONE_DIR test
git clone https://github.com/RSS-Bridge/rss-bridge.git --depth 1 $CLONE_DIR
cd $CLONE_DIR
mv cache cache_
ln -s ../cache cache
wget https://patch-diff.githubusercontent.com/raw/RSS-Bridge/rss-bridge/pull/$PR.patch
cat $PR.patch | patch -p1
cat $PR.patch | grep " bridges/.*\.php" | sed "s= bridges/\(.*\)Bridge.php.*=\1=g" | sort | uniq > whitelist.txt
touch DEBUG
rm ../whitelist.txt
cp whitelist.txt ../
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment