2021-06-18 15:13:57 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Copy the last Git SHA1 to the clipboard
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-07-20 09:52:24 +02:00
|
|
|
if [ "$1" = "-s" ]; then
|
2021-06-18 15:13:57 +02:00
|
|
|
args="--short"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# TODO: fix for non-Darwin
|
|
|
|
git rev-parse $args HEAD | tr -d '\n' | pbcopy
|