Sha256: 9c3aaba21f2815bbb413d5e481a92b24f1c8476b60d8083d8b94a8ac0d204472

Contents?: true

Size: 997 Bytes

Versions: 17

Compression:

Stored size: 997 Bytes

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]
set ulook ".?sername for 'https:\/\/github\.com':.*"
set plook ".?assword for .*@github\.com':.*"
set timeout -1   

# 
# Regular Expressions http://docs.activestate.com/activetcl/8.5/expect4win/regex.html
# 

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 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.16 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.15 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.14 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.13 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.11 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.10 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.9 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.8 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.7 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.6 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.5 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.4 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.3 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.2 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.1 lib/generators/magic_recipes/templates/git_cap.tt
magic_recipes-0.1.0 lib/generators/magic_recipes/templates/git_cap.tt