Created
April 6, 2015 20:22
-
-
Save spazm/926060205fde73d2b858 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wrapper around aws s3 to simpllify get/put of secure resources from our s3 bucket. | |
AWS:= aws | |
S3:=s3://secure.example.com | |
S3PATH:=/ | |
FILE=secure.conf | |
REMOTE=${S3}${S3PATH}${FILE} | |
help: | |
@echo "get: fetch secure.conf from S3" | |
@echo "put: put secure.conf to S3" | |
@echo "ls: list secure.conf on remote S3" | |
@echo "g_keys: get authorized_keys from S3" | |
@echo "p_keys: push authorized_keys from S3" | |
@echo "ls_keys: list authorized_keys on S3" | |
@echo "vars: list vars" | |
vars: | |
@echo "S3: ${S3}" | |
@echo "S3PATH: ${S3PATH}" | |
@echo "FILE: ${FILE}" | |
p_keys g_keys ls_keys: S3PATH=/users/airmedia/ | |
p_keys g_keys ls_keys: FILE=authorized_keys | |
g_keys: get | |
p_keys: put | |
ls_keys: ls | |
fetch: get | |
get: | |
${AWS} s3 cp ${REMOTE} ${FILE} | |
put: | |
${AWS} s3 cp ${FILE} ${REMOTE} | |
ls: | |
${AWS} s3 ls ${REMOTE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yes, Make is totally the wrong tool for this job, but fun nonetheless.
target-specific variable
is used on lines 24,25 to override vars for certain targets. Neat!