#!/bin/bash #Author: Andr3as #Last Edit: 11.09.14 #Purpose: Handler for a git requests with authentification # Copyright (c) Codiad & Andr3as, distributed # as-is and without warranty under the MIT License. # See http://opensource.org/licenses/MIT for more information. # This information must remain intact. command="" password=0 passphrase=0 path="" user=0 #Handle inputs while [ "$1" != "" ] do if [ "$1" == "-u" ] then user=$2 shift shift elif [ "$1" == "-p" ] then password=$2 shift shift elif [ "$1" == "-k" ] then passphrase=$2 shift shift elif [ "$1" == "-c" ] then command=$2 shift shift elif [ "$1" == "-s" ] then path=$2 shift shift else echo "Unknown parameter" echo "$1" shift fi done if [ "$command" == "" ] then echo "No command specified" exit 64 fi if [ "$path" == "" ] then echo "No path specified" exit 64 fi #Execute command cd "$path" /usr/bin/expect <