summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-05-17 21:24:23 +0200
committerJoe <bousset.rudy@gmail.com>2022-05-17 21:24:23 +0200
commita1e3f605c9436b8d2d78d38505e93c0ff3e468d8 (patch)
tree7dfbc9c0749455254585fc80f4bd93e9aa37d5b0 /.local/bin
parentqe (diff)
downloaddotfiles-bsd-a1e3f605c9436b8d2d78d38505e93c0ff3e468d8.tar.gz
dotfiles-bsd-a1e3f605c9436b8d2d78d38505e93c0ff3e468d8.tar.bz2
dotfiles-bsd-a1e3f605c9436b8d2d78d38505e93c0ff3e468d8.tar.xz
dotfiles-bsd-a1e3f605c9436b8d2d78d38505e93c0ff3e468d8.tar.zst
dotfiles-bsd-a1e3f605c9436b8d2d78d38505e93c0ff3e468d8.zip
setwp udpate
Diffstat (limited to '')
-rwxr-xr-x.local/bin/setwp11
1 files changed, 8 insertions, 3 deletions
diff --git a/.local/bin/setwp b/.local/bin/setwp
index 70577ae..6686e67 100755
--- a/.local/bin/setwp
+++ b/.local/bin/setwp
@@ -81,9 +81,14 @@ sub main
my $wp;
my $ret;
- $wp = choose_wp(get_pool_files());
- $ret = set_wp($wp);
- if (@ARGV == 0 || $ARGV[0] ne "-nw") {
+ if (@ARGV != 0 && -f $ARGV[0]) {
+ $ret = set_wp($ARGV[0]);
+ }
+ else {
+ $wp = choose_wp(get_pool_files());
+ $ret = set_wp($wp);
+ }
+ if (@ARGV != 0 && $ARGV[0] eq "-nw") {
notify() if ($ret == 0);
notify_error() if ($ret != 0);
}