summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-30 12:51:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-30 12:51:00 -0400
commit0cb5a895c59af8cb748a4c0b8e9c97efe785d441 (patch)
treed74c9cf89030ee49b96f7f548bccc2d6b319398f
parent6c8393e16f5f652e53e333281ac382bddccb430c (diff)
parent40c64aef7b20ce4c51fbe425fb3b1f2fcbb12714 (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-rw-r--r--doc/bugs/__91__Android__93___5.0_needs_PIE_executables___40__git_annex_does_not_work_on_android_5.0__41__/comment_3_3c37c32fe851f2a8cd854ccdd64b4453._comment8
-rw-r--r--doc/tips/transmission_integration.sh48
2 files changed, 56 insertions, 0 deletions
diff --git a/doc/bugs/__91__Android__93___5.0_needs_PIE_executables___40__git_annex_does_not_work_on_android_5.0__41__/comment_3_3c37c32fe851f2a8cd854ccdd64b4453._comment b/doc/bugs/__91__Android__93___5.0_needs_PIE_executables___40__git_annex_does_not_work_on_android_5.0__41__/comment_3_3c37c32fe851f2a8cd854ccdd64b4453._comment
new file mode 100644
index 000000000..5509e8668
--- /dev/null
+++ b/doc/bugs/__91__Android__93___5.0_needs_PIE_executables___40__git_annex_does_not_work_on_android_5.0__41__/comment_3_3c37c32fe851f2a8cd854ccdd64b4453._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkev8_Er652-NMvfEpn3r5VwulP5phjNuI"
+ nickname="jerome"
+ subject="it need to be built with -fPIE -pie."
+ date="2014-12-30T10:40:11Z"
+ content="""
+https://code.google.com/p/android-developer-preview/issues/detail?id=888
+"""]]
diff --git a/doc/tips/transmission_integration.sh b/doc/tips/transmission_integration.sh
new file mode 100644
index 000000000..056cc6923
--- /dev/null
+++ b/doc/tips/transmission_integration.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+# This simple script will make sure files downloaded by the
+# [Transmission BitTorrent client](https://www.transmissionbt.com/) will
+# be added into git-annex.
+#
+# To enable it, install it to /usr/local/bin and add the following to
+# your settings.json:
+# "script-torrent-done-enabled": true,
+# "script-torrent-done-filename": "/usr/local/bin/transmission-git-annex-add",
+# -- [[anarcat]]
+
+set -e
+
+# environment from transmission:
+# TR_APP_VERSION
+# TR_TIME_LOCALTIME
+# TR_TORRENT_DIR
+# TR_TORRENT_HASH
+# TR_TORRENT_ID
+# TR_TORRENT_NAME
+# source: https://trac.transmissionbt.com/wiki/Scripts
+
+if [ -z "$TR_APP_VERSION" ]; then
+ echo "missing expected $TR_APP_VERSION from Transmission"
+ exit 1
+fi
+
+message="transmission adding torrent '$TR_TORRENT_NAME'
+
+TR_APP_VERSION: $TR_APP_VERSION
+TR_TIME_LOCALTIME: $TR_TIME_LOCALTIME
+TR_TORRENT_DIR: $TR_TORRENT_DIR
+TR_TORRENT_HASH: $TR_TORRENT_HASH
+TR_TORRENT_ID: $TR_TORRENT_ID
+TR_TORRENT_NAME: $TR_TORRENT_NAME
+"
+
+# heredocs preserve newlines
+cat <<EOF
+$message
+EOF
+# add the actual torrent and commit whatever's left to commit
+cd "$TR_TORRENT_DIR"
+git annex add "$TR_TORRENT_NAME" && \
+git commit -F- <<EOF
+$message
+EOF