Fork urlhandler program if run with fork option and pass opt in RSS script

master
Miles Alan 4 years ago
parent fe15eb6755
commit 7a9ec120e1
  1. 2
      scripts/appscripts/sxmo_rss.sh
  2. 6
      scripts/core/sxmo_urlhandler.sh

@ -65,5 +65,5 @@ while true; do
# Handle picked item
URL="$(echo "$PICKED" | gawk -F " " '{print $NF}')"
sxmo_urlhandler.sh "$URL"
sxmo_urlhandler.sh "$URL" fork
done

@ -1,4 +1,5 @@
#!/usr/bin/env sh
FORK="$2"
if [ -n "$1" ]
then
@ -40,4 +41,9 @@ COMMAND=$(
[ -z "$COMMAND" ] && exit 1
RUN=$(echo "$URL" | xargs -IURL echo "$COMMAND")
if [ "$FORK" = fork ]; then
st -e sh -c "$RUN" &
else
st -e sh -c "$RUN"
fi

Loading…
Cancel
Save