1
0
mirror of https://github.com/rlister/dockerfiles.git synced 2025-12-15 18:56:20 +00:00

rename script and add ghcat

This commit is contained in:
Richard Lister
2015-02-09 14:14:23 -05:00
parent b37f5747b0
commit e581ed66c8
3 changed files with 15 additions and 3 deletions

16
github-copy/ghcp Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
## loop each pair of args as a src path and dest dir
while [ $# -gt 0 ]
do
src=$1; shift
dest=$1; shift
mkdir -p "$dest"
(
cd "$dest" && \
/usr/bin/curl -sOL \
-H "Authorization: token $TOKEN" \
-H 'Accept: application/vnd.github.v3.raw' \
"https://api.github.com/repos/${REPO}/contents/${src}"
)
done