summaryrefslogtreecommitdiff
path: root/abraham-porter.sh
diff options
context:
space:
mode:
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