Skip to content

Instantly share code, notes, and snippets.

@drdavella
Created November 28, 2018 02:20
Show Gist options
  • Save drdavella/2385885af14fde5cc83e0f7f58e0bdc0 to your computer and use it in GitHub Desktop.
Save drdavella/2385885af14fde5cc83e0f7f58e0bdc0 to your computer and use it in GitHub Desktop.
Script used to help assist with a semi-automated release process
#!/bin/bash
set -eu
if [ $# != 2 ]; then
echo "USAGE: $(basename $0) <file> <number>"
exit 1
fi
args=("$@")
filename=${args[0]}
lineno=${args[1]}
git cherry-pick $(sed ${lineno}\!d $filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment