Skip to content

Instantly share code, notes, and snippets.

@volpe28v
Created March 12, 2012 09:39
Show Gist options
  • Save volpe28v/2020937 to your computer and use it in GitHub Desktop.
Save volpe28v/2020937 to your computer and use it in GitHub Desktop.
repo 自動化スクリプト
#!/bin/sh
#
# Usage
# ./auto_repo_init_and_sync.sh version
if [ $# -eq 0 ]
then
echo "type version"
exit
fi
TARGET_VER=$1
TARGET_MODEL=YYYYY
expect -c "
set timeout -1
spawn repo init -u git://xxxxxxxxxx.git -b ${TARGET_MODEL} -m ${TARGET_VER}.xml --repo-url git://xxxxxxxx.git
expect {
\"Your Name \" {
send \"\r\"
expect {
\"Your Email \" {
send \"\r\"
expect {
\"is this correct \" {
send \"y\r\"
}
}
}
}
}
}
expect { \"100%\" { exit 0 }}
"
repo sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment