diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2013-07-14 17:14:53 -0700 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2013-07-14 17:14:53 -0700 |
commit | 834a3f2151dd8738a1f878489f6207664c4af5aa (patch) | |
tree | e67d9dab64d86be62c4c785100339ebb69bf0b99 /extra |
Imported Upstream version 1.1.1upstream/1.1.1
Diffstat (limited to 'extra')
-rw-r--r-- | extra/eclipse-paths-gtk3.xml | 34 | ||||
-rw-r--r-- | extra/tpull.sh | 45 |
2 files changed, 79 insertions, 0 deletions
diff --git a/extra/eclipse-paths-gtk3.xml b/extra/eclipse-paths-gtk3.xml new file mode 100644 index 0000000..e4a827d --- /dev/null +++ b/extra/eclipse-paths-gtk3.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<cdtprojectproperties> +<section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths"> +<language name="C Source File"> +<includepath>/usr/include/glib-2.0</includepath> +<includepath>/usr/lib64/glib-2.0/include</includepath> +<includepath>/usr/include/json-glib-1.0</includepath> +<includepath>/usr/include/atk-1.0</includepath> +<includepath>/usr/include/pango-1.0</includepath> +<includepath>/usr/include/cairo</includepath> +<includepath>/usr/include/libnotify</includepath> +<includepath>/usr/include/gtk-3.0</includepath> +<includepath>/usr/lib64/gtk-3.0/include</includepath> + +</language> +<language name="Object File"> + +</language> +<language name="Assembly Source File"> + +</language> +</section> +<section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros"> +<language name="C Source File"> + +</language> +<language name="Object File"> + +</language> +<language name="Assembly Source File"> + +</language> +</section> +</cdtprojectproperties> diff --git a/extra/tpull.sh b/extra/tpull.sh new file mode 100644 index 0000000..eaa2909 --- /dev/null +++ b/extra/tpull.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# This is a really simple script intended to be run as an action +# from transmission-remote-gtk. It uses rsync to fetch +# a torrent/torrents to a local directory (or put it somewhere +# remote and run it using ssh to there). + +# It also shows how we can call transmission-remote with +# connection details to find information about a torrent or +# manipulate it. + +# Example +# gnome-terminal -e "tpull.sh %{hostname} %{port} %{username}:%{password} %{id}[,] /srv/incoming/" + +if [ -z "$5" ]; then + echo "usage: <host> <port> <user:pass> <id> <dest>" + exit 1 +fi + +HOST=$1 +TPORT=$2 +TAUTH=$3 +IDS=$4 +DEST=$5 + +echo $IDS | sed "s/,/\n/g" | while read id; do + DETAILS=$(transmission-remote $HOST:$TPORT -n $TAUTH -t $id -i) + + if [ $? -ne 0 ]; then + read + exit 1 + fi + + LOCATION=$(echo "$DETAILS" | egrep '^\s+Location:' | cut -c 13-) + NAME=$(echo "$DETAILS" | egrep '^\s+Name:' | cut -c 9-) + + if [ -z "$LOCATION" -o -z "$NAME" ]; then + continue + fi + + FULLPATH="$LOCATION/$NAME" + + echo "Syncing $FULLPATH ..." + rsync -avPs "$HOST:$FULLPATH" "$DEST" +done |