Skip to content

Instantly share code, notes, and snippets.

View rchapin's full-sized avatar

Ryan Chapin rchapin

View GitHub Profile
@rchapin
rchapin / update-remote-url.sh
Created January 2, 2021 23:10
Bash script for updating the remote URL for multiple repos
#!/bin/bash
# #############################################################################
# If you typically keep your cloned repos in a single directory and happen
# to move the location of your remote, here is a script for quickly updating
# the remote url for all of the cloned repos in a given directory.
#
# Run from the same directory in which all of the repos reside as follows:
#
# /update-remote-url.sh "dir1 dir2 dir3" "[email protected]:/path/to/parent/dir"
@rchapin
rchapin / getopt-example.sh
Created December 8, 2014 02:46
Parsing command line arguments with getopt in Bash script
#!/bin/bash
###############################################################################
# A example of how to use getopt to parse command line options.
#
# name: getopt-example.sh
# author: Ryan Chapin
# created: 2014-11-11
################################################################################
# USAGE: