projects
/
xremote.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now read arguments from a .xremote file by default if it exists.
[xremote.git]
/
xremote.sh
diff --git
a/xremote.sh
b/xremote.sh
index
9752a9a
..
ecf6f3e
100755
(executable)
--- a/
xremote.sh
+++ b/
xremote.sh
@@
-56,6
+56,10
@@
xremote.sh [-h <remote_host>] [-i <remote_dir>] <script> [script arguments]
@XREMOTE_GET: *.dat
@XREMOTE_PRE: ln -s /home/fleuret/data/pytorch ./data
@XREMOTE_GET: *.dat
@XREMOTE_PRE: ln -s /home/fleuret/data/pytorch ./data
+ If a file with the same name as the script with the .xremote
+ extension appended to it exists, arguments will be read from it by
+ default.
+
If the -h option is provided @XREMOTE_HOST is ignored.
If the -i option is provided, all the files are installed and
If the -h option is provided @XREMOTE_HOST is ignored.
If the -i option is provided, all the files are installed and
@@
-110,6
+114,12
@@
done
[[ -a "$1" ]] || (help && exit 1)
main="$(basename "$1")"
[[ -a "$1" ]] || (help && exit 1)
main="$(basename "$1")"
+main_config="${main}.xremote"
+
+if [[ ! -f "${main}.xremote" ]]
+then
+ main_config="${main}"
+fi
cd "$(dirname "$1")"
cd "$(dirname "$1")"
@@
-166,7
+176,7
@@
do
esac
fi
esac
fi
-done < "${main}"
+done < "${main
_config
}"
######################################################################
######################################################################
@@
-226,7
+236,7
@@
do
;;
esac
fi
;;
esac
fi
-done < "${main}"
+done < "${main
_config
}"
set +f
set +f