Fork urlhandler program if run with fork option and pass opt in RSS script
This commit is contained in:
parent
fe15eb6755
commit
7a9ec120e1
2 changed files with 8 additions and 2 deletions
|
@ -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")
|
||||
st -e sh -c "$RUN"
|
||||
|
||||
if [ "$FORK" = fork ]; then
|
||||
st -e sh -c "$RUN" &
|
||||
else
|
||||
st -e sh -c "$RUN"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue