Dolda2000 GitWeb
/
utils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Replaced rsc with a bash version without remote dependencies.
[utils.git]
/
rsc
1
#!/bin/bash
2
3
set -e
4
5
if [ $# -lt 2 ]; then
6
echo "usage: rsc HOST COMMAND ARGS..." >&2
7
exit 1
8
fi
9
10
host="$1"; shift
11
cmd="$1"; shift
12
13
(
14
echo -n "$cmd"; echo -ne '\0'
15
for arg in "$@"; do
16
echo -n "$arg"; echo -ne '\0'
17
done
18
) | exec ssh "$host" "xargs -0x sh -c 'exec \$0 \"\$@\"'"