summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-01-24 12:10:55 +0000
committerKatolaZ <katolaz@freaknet.org>2019-01-24 12:10:55 +0000
commit380c0ef20abcd95477e4e690deb7840be95d9a98 (patch)
tree9f7cedbafd7766130c1c140f093d590fd46e0c81
parent6179fc6738adc18767f405ffb6713640cd7a5432 (diff)
remove trailing spaces
-rwxr-xr-xgophed8
1 files changed, 4 insertions, 4 deletions
diff --git a/gophed b/gophed
index 2bb9b7e..c15e780 100755
--- a/gophed
+++ b/gophed
@@ -33,7 +33,7 @@ trap cleanup INT QUIT HUP KILL ABRT TERM
[ "$#" -lt 1 ] || [ "$1" = -h ] && usage
-if [ "$0" = gophed ] && [ "$1" = -i ]; then
+if [ "$0" = gophed ] && [ "$1" = -i ]; then
ln -sf "$0" g
ln -sf "$0" d
ln -sf "$0" v
@@ -51,13 +51,13 @@ if [ "$script_name" = gophed ] || [ "$script_name" = v ]; then
exit 0
fi
-if [ "$script_name" = g ] || [ "$script_name" = d ]; then
+if [ "$script_name" = g ] || [ "$script_name" = d ]; then
LINE="$(awk "{if (NR == '$2') print '$0';}" "$1")"
RESOURCE="$(printf '%s' "$LINE" | cut -d ' ' -f 2)"
HOST="$(printf '%s' "$LINE" | cut -d ' ' -f 3)"
PORT="$(printf '%s' "$LINE" | awk -F ' ' '{ match($4,/[[:digit:]]+/); print substr($4,RSTART,RLENGTH) }')"
-
- if [ "$script_name" = g ]; then
+
+ if [ "$script_name" = g ]; then
SEL="$(printf '%s' "$RESOURCE" | sed -r 's:/:+:g')"
TMPFILE="$(mktemp "/tmp/gophed_${HOST}_${SEL}_$PORT.XXXXXXXXXXXXXXXXXXX")"
go "$RESOURCE" "$HOST" "$PORT" > "$TMPFILE"