Last active
July 28, 2018 12:14
-
-
Save yshalsager/ff20cdfc24f793f2dfc029547001ac8a to your computer and use it in GitHub Desktop.
Switch between TWRP and RedWolf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#bin/bash | |
path=~/ysh/recovery | |
if [ -e 7/version ] | |
then | |
echo source is $(cat 7/version) | |
else | |
echo "can't file source info" | |
fi | |
echo "Choose source you want to build:" | |
echo "1- TWRP" | |
echo "2- RedWolf" | |
read choose | |
if [ $choose -eq 1 ] | |
then | |
echo "Switching to TWRP!" | |
# Deleting files | |
cd $path/7/build/ ; rm -rf buildspec.mk.default CleanSpec.mk core envsetup.sh libs target tools | |
cd $path/7/bootable/ ; rm -rf recovery | |
# Copying new files | |
cd $path/twrp/build/ ; cp -r buildspec.mk.default CleanSpec.mk core envsetup.sh libs target tools $path/7/build/ | |
cd $path/twrp/ ; cp -r recovery $path/7/bootable/ | |
echo "TWRP" > $path/7/version | |
elif [ $choose -eq 2 ] | |
then | |
echo "Switching to RedWolf!" | |
# Deleting files | |
cd $path/7/build/ ; rm -rf buildspec.mk.default CleanSpec.mk core envsetup.sh libs target tools | |
cd $path/7/bootable/ ; rm -rf recovery | |
# Copying new files | |
cd $path/rw/build/ ; cp -r buildspec.mk.default CleanSpec.mk core envsetup.sh libs target tools $path/7/build/ | |
cd $path/rw/; cp -r recovery $path/7/bootable/ | |
echo "RedWolf" > $path/7/version | |
else | |
echo "Please choose from menu only!" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment