#!/bin/SH#ROOT_DIR=/backup/Prj_name=6592wetcustbrr_name=MYDEVCD $ROOT _dir$prj_name"/"Echo ">>>>>>>>. Repo clean. <<<<<<<<<<<<<"Repo ForAll-C git Reset--Hardrepo forall-C git clean-XfDEcho ">>>>>>>> repo abandon. <<<<<<<<<<<<<"repo abandon $BRR _name#Echo ">>>>>>>>: Run repo sync >>>>>>>> start"RepoSyncEcho ">>>>>>>>.. create Branches:stm_ics_tyapps_cust_dev >>>>>>>> "repo start $BRR _name-- AllEcho ".... rm out dir"RM-rf./out
Collaborative development of Android projects sometimes requires synchronization of code, and there are more parts that need to be synchronized. You can save the above script content as autosynccode.sh, run this script under the Ubuntu command line (you need to add executable permissions first chmod a+x autosynccode.sh), you can implement the current project automatically clean, and synchronize the code to the latest version of the server, automatically create a local branch, delete the Out directory.
The root_dir is the root directory of your project (this is/backup/)
Prj_name project Directory
Brr_name Local Work Branch name
Can be modified according to their own project name and directory.