Skip to content

Instantly share code, notes, and snippets.

@colbylwilliams
Last active January 19, 2016 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colbylwilliams/1bd9565e9ddd70b9a93a to your computer and use it in GitHub Desktop.
Save colbylwilliams/1bd9565e9ddd70b9a93a to your computer and use it in GitHub Desktop.
#!/bin/bash
manifestPath=
placeholderKey=
googleMapsKey=
while getopts "m:p:g:" o; do
case "${o}" in
m) manifestPath="${OPTARG}" ;;
p) placeholderKey="${OPTARG}" ;;
g) googleMapsKey="${OPTARG}" ;;
esac
done
shift $((OPTIND-1))
sed -i '' "s/$placeholderKey/$googleMapsKey/g" "$manifestPath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment