Synchronize Android items with scripts to the latest version of the server

Source: Internet
Author: User

#!/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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.