Sha256: fdbe506cf4e7c9492b09911ab501629a2d1460866cd4977d4ca3d0bb241de149

Contents?: true

Size: 1.07 KB

Versions: 17

Compression:

Stored size: 1.07 KB

Contents

#!/usr/bin/expect -f
# 
# Expect script to supply username/password to cap deploy to git private repository
# 
# This script needs username and password as arguments to connect to git server:
# ------------------------------------------------------------------------
# ./git_cap gitusr gitpwd
# -------------------------------------------------------------------------
# 
# set Variables
# 
set g_user [lrange $argv 0 0]
set g_pwd [lrange $argv 1 1]
# 
# Regular Expressions ... http://docs.activestate.com/activetcl/8.5/expect4win/regex.html
# 
set ulook ".?sername for 'https:\/\/github\.com':.*"
set plook ".?assword for .*@github\.com':.*"
# 
# set TimeOut
# 
set timeout -1

# 
# start deployment .. expects git_user + git_password 2 times !
# 

spawn cap deploy
match_max 100000

# Look for user prompt
expect -re $ulook
send -- "$g_user\r"
send -- "\r"

# Look for passwod prompt
expect -re $plook
send -- "$g_pwd\r"
send -- "\r"

# Look for user prompt
expect -re $ulook
send -- "$g_user\r"
send -- "\r"

# Look for passwod prompt
expect -re $plook
send -- "$g_pwd\r"
send -- "\r"

expect eof

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
magic_recipes-0.1.17 bin/git_cap
magic_recipes-0.1.16 bin/git_cap
magic_recipes-0.1.15 bin/git_cap
magic_recipes-0.1.14 bin/git_cap
magic_recipes-0.1.13 bin/git_cap
magic_recipes-0.1.11 bin/git_cap
magic_recipes-0.1.10 bin/git_cap
magic_recipes-0.1.9 bin/git_cap
magic_recipes-0.1.8 bin/git_cap
magic_recipes-0.1.7 bin/git_cap
magic_recipes-0.1.6 bin/git_cap
magic_recipes-0.1.5 bin/git_cap
magic_recipes-0.1.4 bin/git_cap
magic_recipes-0.1.3 bin/git_cap
magic_recipes-0.1.2 bin/git_cap
magic_recipes-0.1.1 bin/git_cap
magic_recipes-0.1.0 bin/git_cap