improve comments

This commit is contained in:
Joey Hess 2013-12-27 02:56:34 -04:00
parent 3289155e28
commit 526a7bb2b4
2 changed files with 8 additions and 4 deletions

View file

@ -98,8 +98,7 @@ The following requests *must* all be supported by the special remote.
Requests the transfer of a key. For Send, the File is the file to upload; Requests the transfer of a key. For Send, the File is the file to upload;
for Receive the File is where to store the download. for Receive the File is where to store the download.
Note that the File should not influence the filename used on the remote. Note that the File should not influence the filename used on the remote.
The filename used should be derived from the Key, and will not contain The filename will not contain any whitespace.
any whitespace.
Multiple transfers might be requested by git-annex, but it's fine for the Multiple transfers might be requested by git-annex, but it's fine for the
program to serialize them and only do one at a time. program to serialize them and only do one at a time.
* `CHECKPRESENT Key` * `CHECKPRESENT Key`

View file

@ -52,9 +52,14 @@ while read line; do
INITREMOTE) INITREMOTE)
# Do anything necessary to create resources # Do anything necessary to create resources
# used by the remote. Try to be idempotent. # used by the remote. Try to be idempotent.
#
# Use GETCONFIG to get any needed configuration # Use GETCONFIG to get any needed configuration
# settings, and SETCONFIG to set any persistent # settings, and SETCONFIG to set any persistent
# configuration settings. # configuration settings.
#
# (Note that this is not run every time, only when
# git annex initremote or git annex enableremote is
# run.)
getconfig directory getconfig directory
mydirectory="$RET" mydirectory="$RET"
if [ -z "$mydirectory" ]; then if [ -z "$mydirectory" ]; then
@ -91,7 +96,7 @@ while read line; do
RETRIEVE) RETRIEVE)
# Retrieve from a location based on # Retrieve from a location based on
# the key, outputting to the file. # the key, outputting to the file.
# XXX when easy, send PROGRESS # XXX when easy to do, send PROGRESS
calclocation "$key" calclocation "$key"
if runcmd cp -v "$LOC" "$file"; then if runcmd cp -v "$LOC" "$file"; then
echo TRANSFER-SUCCESS RETRIEVE "$key" echo TRANSFER-SUCCESS RETRIEVE "$key"
@ -110,7 +115,7 @@ while read line; do
if [ -d "$mydirectory" ]; then if [ -d "$mydirectory" ]; then
echo CHECKPRESENT-FAILURE "$key" echo CHECKPRESENT-FAILURE "$key"
else else
# If the directory does not exist, # When the directory does not exist,
# the remote is not available. # the remote is not available.
# (A network remote would similarly # (A network remote would similarly
# fail with CHECKPRESENT-UNKNOWN # fail with CHECKPRESENT-UNKNOWN