We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6892bc3 commit 899d1ecCopy full SHA for 899d1ec
file.bash
@@ -1,4 +1,4 @@
1
-#!/bin/sh
+#!/usr/bin/env bash
2
3
print_usage() {
4
echo "Usage: $PROGRAM file action pass-name [path]"
@@ -9,10 +9,14 @@ print_usage() {
9
}
10
11
cmd_store() {
12
- local path="$1.b64"
+ local path="$1"
13
local file="$2"
14
local passfile="$PREFIX/$path.gpg"
15
16
+ if [[ ${path: -4} != ".b64" ]]; then
17
+ path="${path}.b64"
18
+ fi
19
+
20
cd $OLDPWD # fix for relative paths
21
22
check_sneaky_paths "$1"
@@ -41,9 +45,13 @@ cmd_store() {
41
45
42
46
43
47
cmd_retrieve() {
44
48
49
50
51
52
53
54
55
if [[ -z $path ]]; then
56
print_usage
57
else
0 commit comments