Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 16 lines (13 sloc) 391 Bytes
repository=$1
file=$2
if [ -z $repository || -z "$file" ]; then
echo "git/echo script requires 2 arguments"
exit 1
fi
directory=$repository
directory=${directory##*/}
directory=${directory%.*}
mkdir -p /var/tmp/repositories/
directory=/var/tmp/repositories/${directory}
[ -d "$directory" ] || git clone $repository $directory
(echo "cat <<EOF"; cat ${directory}/${file}; echo EOF) | sh
You can’t perform that action at this time.