diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-08-20 20:44:34 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-08-20 20:44:34 -0300 |
commit | e851401694daacaf1aba2c87ed557e5dbf00af02 (patch) | |
tree | d772b15f3a5ba9e015936f7162f448a7208a4001 /tomb-open | |
parent | d6a4d78d31ffa57e00a7d5b0a87baa38156cee06 (diff) | |
download | scripts-e851401694daacaf1aba2c87ed557e5dbf00af02.tar.gz scripts-e851401694daacaf1aba2c87ed557e5dbf00af02.tar.bz2 |
Move scripts to other repositories
Diffstat (limited to 'tomb-open')
-rwxr-xr-x | tomb-open | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tomb-open b/tomb-open deleted file mode 100755 index 5154215..0000000 --- a/tomb-open +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# -# Open a Tomb. -# - -# Parameters -TOMBS="$HOME/data/tombs" -KEYS="$HOME/.tombs" -BASENAME="`basename $0`" -TOMB="$1" - -# Check -if [ ! -d "$TOMBS" ]; then - echo "error: no cemetery available at $TOMBS" - exit 1 -elif [ -z "$TOMB" ]; then - echo "usage: $BASENAME <tomb>" - echo "available tombs: `ls $TOMBS | xargs basename -a -s .tomb | xargs echo`" - exit 1 -elif [ ! -e "$TOMBS/$TOMB.tomb" ]; then - echo "tomb not found: $TOMBS/$TOMB.tomb" - exit 1 -elif [ ! -e "$KEYS/$TOMB.tomb.key" ]; then - echo "missing keyfile $KEYS/$TOMB.tomb.key" - exit 1 -fi - -# Unnanex -if [ -d "$TOMBS/.git/annex" ] && [ -h "$TOMBS/$TOMB.tomb" ]; then - ( cd $TOMBS && git annex unlock $TOMB.tomb ) -fi - -# Dispatch -tomb open $TOMBS/$TOMB.tomb -k $KEYS/$TOMB.tomb.key |