projects
/
xremote.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a8c2fcf
)
Simplified a bit.
master
author
Francois Fleuret
<francois@fleuret.org>
Mon, 3 Aug 2020 17:35:21 +0000
(19:35 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 3 Aug 2020 17:35:21 +0000
(19:35 +0200)
xremote.sh
patch
|
blob
|
history
diff --git
a/xremote.sh
b/xremote.sh
index
478a773
..
bcb33ca
100755
(executable)
--- a/
xremote.sh
+++ b/
xremote.sh
@@
-70,7
+70,8
@@
xremote.sh [--help] [-h <remote_host>] [-d <remote_dir>] [-r <local_result_dir>]
main executable and post-run commands are ignored
If the -r option is provided, the result files specified with
main executable and post-run commands are ignored
If the -r option is provided, the result files specified with
- @XREMOTE_GET will be downloaded there.
+ @XREMOTE_GET will be downloaded there instead of the current
+ directory.
If no argument is provided to @XREMOTE_HOST, and the -h option is
not specified, the environment variable \$XREMOTE_HOST is used
If no argument is provided to @XREMOTE_HOST, and the -h option is
not specified, the environment variable \$XREMOTE_HOST is used
@@
-170,8
+171,8
@@
do
if [[ "${line}" =~ '@XREMOTE' ]]
then
if [[ "${line}" =~ '@XREMOTE' ]]
then
- label=$(
echo "${line}" | sed -e 's/^.*@XREMOTE_\([^:]*\):.*$/\1/'
)
- value=$(
echo "${line}" | sed -e 's/^.*@XREMOTE_[^:]*: *\(.*\)$/\1/'
)
+ label=$(
sed -e 's/^.*@XREMOTE_\([^:]*\):.*$/\1/' <<<"${line}"
)
+ value=$(
sed -e 's/^.*@XREMOTE_[^:]*: *\(.*\)$/\1/' <<<"${line}"
)
case "${label}" in
case "${label}" in
@@
-260,12
+261,14
@@
else
RESULT_DIR="."
fi
RESULT_DIR="."
fi
+[[ "${ARG_RESULT_DIR}" ]] && mkdir -p "${ARG_RESULT_DIR}"
+
while read line
do
if [[ "${line}" =~ '@XREMOTE' ]]
then
while read line
do
if [[ "${line}" =~ '@XREMOTE' ]]
then
- label=$(
echo "${line}" | sed -e 's/^.*@XREMOTE_\([^:]*\):.*$/\1/'
)
- value=$(
echo "${line}" | sed -e 's/^.*@XREMOTE_[^:]*: *\(.*\)$/\1/'
)
+ label=$(
sed -e 's/^.*@XREMOTE_\([^:]*\):.*$/\1/' <<<"${line}"
)
+ value=$(
sed -e 's/^.*@XREMOTE_[^:]*: *\(.*\)$/\1/' <<<"${line}"
)
case "${label}" in
POST)
check_remote_is_defined
case "${label}" in
POST)
check_remote_is_defined