commit a7b5f7846d31420e3eb045a0f831158f1f876f45 from: Alex Arx via: Alex Arch date: Sun Mar 16 08:11:35 2025 UTC remove the SECSTORE_COMMAND variable handling commit - b501f1d9144a3f3d2dc0afb91d96bc612fb8b6b9 commit + a7b5f7846d31420e3eb045a0f831158f1f876f45 blob - c78f78602562e188f4aaca934e7b1e380ba4f7f1 blob + 03e981b7a8c14cb5a2aaade702cf4149285d28f3 --- secstore +++ secstore @@ -33,12 +33,6 @@ sub usage { die "usage: secstore [-d dir] command [arg ...]\n"; } -# getflags: put environment flags at the start of @ARGV -sub getflags { - my ($var) = @_; - unshift(@ARGV, shellwords $ENV{$var} // '') if defined $var && $var ne ''; -} - # shellquote: return string suitable for using as an argument for sh sub shellquote { my ($s) = @_; @@ -360,17 +354,17 @@ chdir $secstore_dir or die "couldn't change directory for ($cmd) { if (/^add$/) { - secstore_add(getflags "SECSTORE_ADD"); + secstore_add(); } elsif (/^(cp|copy)$/) { - secstore_copy(getflags "SECSTORE_COPY"); + secstore_copy(); } elsif (/^(ls|list)$/) { - secstore_list(getflags "SECSTORE_LIST"); + secstore_list(); } elsif (/^(mv|move)$/) { - secstore_move(getflags "SECSTORE_MOVE"); + secstore_move(); } elsif (/^print$/) { - secstore_print(getflags "SECSTORE_PRINT"); + secstore_print(); } elsif (/^(rm|remove)$/) { - secstore_remove(getflags "SECSTORE_REMOVE"); + secstore_remove(); } else { die "unknown command: " . $cmd . "\n" }