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
| #!/bin/bash | |
| function safe_curl() { | |
| # call this with a url argument, e.g. | |
| # safecurl.sh "http://myhost.com:8080/eureka/v2/apps/" | |
| # separating the (verbose) curl options into an array for readability | |
| hash curl 2>/dev/null || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; } | |
| hash jq 2>/dev/null || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; } | |
| hash sed 2>/dev/null || { echo >&2 "I require sed but it's not installed. Aborting."; exit 1; } |
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
| #!/usr/bin/env bash | |
| # Usage: | |
| # ./git_move.sh git@repo_site.com:/my_repo.git origin/folder/path/ /destination/repo/path/ new/folder/path/ | |
| if [ $# -lt 4 ] ; then | |
| echo "Usage: $0 git@repo_site.com:/my_repo.git origin/folder/path/ /destination/repo/path/ new/folder/path/" | |
| exit | |
| fi |