summaryrefslogtreecommitdiff
path: root/abraham-porter.sh
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-05-19 16:55:44 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-05-19 16:55:44 -0400
commit86bda792526ffbd675afd3e0841cce517187bde6 (patch)
treeb99117826b702daed7d1b32ac0eac2bc3cc78779 /abraham-porter.sh
parent0ce7301d8799ba91a0d57ab208e2d80d20935a83 (diff)
downloadscripts-86bda792526ffbd675afd3e0841cce517187bde6.tar.xz
scripts-86bda792526ffbd675afd3e0841cce517187bde6.zip
added screencasting script, mail block, minor tweaks
Diffstat (limited to 'abraham-porter.sh')
-rwxr-xr-xabraham-porter.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/abraham-porter.sh b/abraham-porter.sh
index ec4ca55..02a6b90 100755
--- a/abraham-porter.sh
+++ b/abraham-porter.sh
@@ -1,7 +1,8 @@
#!/bin/sh
+## Abraham Porter - do things with ports
+
## Configuration
-dmenu="rofi -dmenu"
doas="doas"
terminal="alacritty"
pager="rofi -location 2 -width -81 -e"
@@ -23,14 +24,14 @@ NO_WANT_ANOTHER_PROVIDED=7
get_port() {
cwd=$(pwd)
cd "$ports_dir"
- printf "%s\n" */* | $dmenu -p "Port"
+ printf "%s\n" */* | dmenu -p "Port"
cd "$cwd"
}
## Prompt user if they want to run command in a new term
wants_term() {
- choice=$(printf "no\nyes\n" | $dmenu -p "Do you want to do this in a new terminal?")
+ choice=$(printf "no\nyes\n" | dmenu -p "Do you want to do this in a new terminal?")
[ $choice = "no" ] && return 1
[ $choice = "yes" ] && return 0
exit $NO_WANT_TERM_PROVIDED
@@ -39,7 +40,7 @@ wants_term() {
## Gets an action from the user with dmenu
get_action() {
- action=$($dmenu -p "Abraham Porter" << EOF
+ action=$(dmenu -p "Abraham Porter" << EOF
1. print pkg-descr
2. set options
3. set options, add to pkglist
@@ -87,11 +88,13 @@ handle_poudriere_options_single() {
## Handle running poudriere bulk on a single port
handle_poudriere_bulk_single() {
port="$1"
+ notify-send "Poudriere bulk started" "$port"
if wants_term; then
$terminal -e $doas poudriere bulk -j "$jail" $port
else
$doas poudriere bulk -j "$jail" $port
fi
+ notify-send "Poudriere bulk finished" "$port"
}
@@ -103,16 +106,18 @@ handle_poudriere_options_pkglist() {
## Handle running poudriere bulk on pkglist
handle_poudriere_bulk_pkglist() {
+ notify-send "Poudriere bulk started" "(pkglist)"
if wants_term; then
$terminal -e $doas poudriere bulk -j "$jail" -f "$pkglist"
else
$doas poudriere bulk -j "$jail" -f "$pkglist"
fi
+ notify-send "Poudriere bulk finished" "(pkglist)"
}
get_another() {
- choice=$($dmenu -p "Do you want another?" << EOF
+ choice=$(dmenu -p "Do you want another?" << EOF
no
yes
EOF