Skip to content

Instantly share code, notes, and snippets.

@Surendrajat
Created July 7, 2018 06:50
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 Surendrajat/af3092e4e276bde59b165a5a41a8be79 to your computer and use it in GitHub Desktop.
Save Surendrajat/af3092e4e276bde59b165a5a41a8be79 to your computer and use it in GitHub Desktop.
tb=$(pwd) ; for device in `ls -l device/*/* -d | cut -d : -f 2 | cut -d " " -f 2`; do echo $tb/$device && cd $tb/$device;
#sed -i 's/yshalsager/surendrajat/g' ./.travis.yml
#sed -i 's/cyanogenmod/twrp-builder/g' ./.travis.yml
# sed -i '/^\ \ -\ cd/s/android_device_/android_device_samsung_/g' ./.travis.yml
# sed -i '/repo:/s/android_device_/android_device_samsung_/g' ./.travis.yml
sed -i 's/device_generic_twrpbuilder/android_device_generic_twrpbuilder/g' ./.travis.yml
git commit -a -m "CI: updated repo name for twrp-builder dt"
repo=`cat .travis.yml | grep 'repo: ' | cut -d " " -f6 | cut -d / -f2 | sed 's/^ *//g'`
branch=`cat .travis.yml | grep 'branch: ' | cut -d " " -f6 | sed 's/^ *//g'`
git checkout -b $branch
git remote add origin https://github.com/TwrpBuilder"/"$repo.git
git push https://user_name:access_token@github.com/TwrpBuilder/$repo HEAD:$branch ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment