From: Chris Koeritz Date: Mon, 10 Oct 2016 05:43:13 +0000 (-0400) Subject: new fortune, new script for ebook synching. X-Git-Tag: 2.140.90~371 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=8ef26064b2bf86f411a9ea09cc5cb3e648e40f81;p=feisty_meow.git new fortune, new script for ebook synching. --- diff --git a/infobase/fortunes.dat b/infobase/fortunes.dat index 4c4fff49..50f16e36 100644 --- a/infobase/fortunes.dat +++ b/infobase/fortunes.dat @@ -42195,5 +42195,21 @@ Discover wisdom Accept constant change. -##--#Source: "Moon journeying through clouds", Zen Buddhist chants, sayings and recitations from the Buddhist Society for Compassionate Wisdom. + -- Source: "Moon journeying through clouds", Zen Buddhist chants, sayings and recitations from the Buddhist Society for Compassionate Wisdom. +~ +never forget that the truth is always larger than you know. + -- fred t. hamster +~ +Roger Babson's Ten Commandments of Investing + ++ Keep speculation and investments separate. ++ Don't be fooled by a name. ++ Be wary of new promotions. ++ Give due consideration to market ability. ++ Don't buy without proper facts. ++ Safeguard purchases through diversification. ++ Don't try to diversify by buying different securities of the same company. ++ Small companies should be carefully scrutinized. ++ Buy adequate security, not super abundance. ++ Choose your dealer and buy outright (i.e., don't buy on margin.) diff --git a/scripts/files/synch_to_mtp_device.sh b/scripts/files/synch_to_mtp_device.sh new file mode 100644 index 00000000..254ed7f1 --- /dev/null +++ b/scripts/files/synch_to_mtp_device.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +sourcedir="$1"; shift +targetdir="$1"; shift + +# where we will look for mtp devices. +mtp_base_path="/run/user/$UID/gvfs/mtp\:host\=" + +if [ -z "$sourcedir" -o -z "$targetdir" ]; then + echo "This script needs source and target directory names that can be synched" + echo "between the computer's file system and a USB drive mounted with the mtp" + echo "protocol. The folder on the USB drive should include the entire path except" + echo "for the device mount location. For example:" + echo " $(basename $0) ebooks \"/Internal\ Storage/My\ Files/ebooks\"" + exit 1 +fi + +# the mtp part will flux. if there is more than one device mounted, this will hose up. +#checking for more than one device there: +mtpdevices=("$mtp_base_path"*) +if [ ${#mtpdevices[@]} -ne 1 ]; then + echo "There is more than one MTP device mounted. This script requires exactly one" + echo "MTP device mounted at a time. Sorry." + exit 1 +elif [ ! -d "${#mtpdevices[@]}" ]; then + echo "The MTP device does not seem to be mounted currently. The path did not" + echo "expand properly." + exit 1 +fi + +rsync -rv --exclude *.git --exclude *.svn "$sourcedir" "${mtpdevices[0]}/$targetdir" +