@ 260802.2

200426.5 · 481b64a667e8d9aca522a0455a00f32dac1f4977

initial commit of ~/bin

This brings over everything that was in my bin-only repository.

I removed scripts that were unused or were no longer understood. I also moved any work-specific scripts to a separate (private) repository.

reading declarations

Changes to bin/ssh-add-key. All files

bin/ssh-add-key

new file mode 100755@@ -0,0 +1,29 @@+#!/bin/sh++set -e++name="$1"+org="$2"+if [ -z "$name" ]; then+    echo "Usage: $(basename "$0") <ssh-key-name> [<org-name>]" >&2+    exit 1+fi+if [ -z "$org" ]; then+    org=andrew+fi++key="$HOME/.ssh/keys/$name"+if [ "$name" = "google-compute-engine" ]; then+  key="$HOME/.ssh/google_compute_engine"+fi+if ! [ -f "$key" ]; then+    echo "$key: does not exist" >&2+    exit 1+fi++passphrase="$org/ssh/$name/passphrase"+if ! pass "$passphrase" > /dev/null 2>&1; then+    ssh-add "$key"+else+    ssh-add-pass-key "$key" "$passphrase"+fi