alpha
Login
or
Join now
j3s.sh
/
dotfiles
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
my dotz
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
require arg for edit
author
j3s
date
5 years ago
(Jan 28, 2021, 2:15 PM -0600)
commit
6d7b6a5c
6d7b6a5c000ae8e81996d48b04ecdb9ffa0d12bd
parent
a1c34365
a1c34365f953b8c34de39b72d06132f8fd670cd0
+7
-8
1 changed file
Expand all
Collapse all
Unified
Split
bin
pa
+7
-8
bin/pa
Reviewed
···
181
181
die "Can't access password directory"
182
182
183
183
[ -f ~/.age/key.txt ] || pw_gen
184
184
+
pubkey=$(sed -n 's/.*\(age\)/\1/p' ~/.age/key.txt)
184
185
185
185
-
glob "$1" '[acds]*' && [ -z "$2" ] &&
186
186
+
glob "$1" '[acdes]*' && [ -z "$2" ] &&
186
187
die "Missing [name] argument"
187
188
188
189
glob "$1" '[cds]*' && [ ! -f "$2.age" ] &&
···
200
201
glob "$2" '*/*' && { mkdir -p "${2%/*}" ||
201
202
die "Couldn't create category '${2%/*}'"; }
202
203
203
203
-
pubkey=$(sed -n 's/.*\(age\)/\1/p' ~/.age/key.txt)
204
204
-
205
204
# Restrict permissions of any new files to
206
205
# only the current user.
207
206
umask 077
···
211
210
[ -t 1 ] && trap 'stty echo icanon' INT EXIT
212
211
213
212
case $1 in
214
214
-
a*) pw_add "$2" ;;
215
215
-
d*) pw_del "$2" ;;
216
216
-
e*) pw_edit "$2" ;;
217
217
-
s*) pw_show "$2" ;;
218
218
-
l*) pw_list ;;
213
213
+
a*) pw_add "$2" ;;
214
214
+
d*) pw_del "$2" ;;
215
215
+
e*) pw_edit "$2" ;;
216
216
+
s*) pw_show "$2" ;;
217
217
+
l*) pw_list ;;
219
218
*) usage
220
219
esac
221
220
}