[[ ${archive_size_min} ]] || archive_size_min=1048576 # 1Mb
+# if [[ -z $* ]] && [[ ${PHO_NOTE_1} ]]; then
+ # echo "$0 ${PHO_NOTE_1}"
+ # $0 ${PHO_NOTE_1}
+ # exit 0
+# fi
+
+export ARCHIVED_PICS="$*"
+
set -e
if [[ ! ${IMAGE_ARCHIVE_DIR} ]]; then
if [[ -f ${base}.jpg ]]; then ref=${base}.jpg; fi
if [[ -f ${base}.jpeg ]]; then ref=${base}.jpeg; fi
- echo "ref=${ref}"
+ # echo "ref=${ref}"
if [[ -f ${ref} ]]; then
function ripdvd () {
mkdir -p ${HOME}/dvds
cd ${HOME}/dvds
- dvdbackup -v -M && eject
+ time dvdbackup -v -M && eject
}
######################################################################
# git clone http://fleuret.org/git/selector/
function selector-history () {
- selector --bash -c 7,4,0,3 -q -l 15000 <(history)
+ selector --bash -c 7,4,0,3 -q <(history)
}
# Find pathes in the history and make a list of the existing ones
HISTIGNORE="${HISTIGNORE}:selector-history"
+function selector-printer () {
+ TMP=$(mktemp /tmp/selector-printer.XXXXXX)
+ selector -o ${TMP} <(lpstat -a | awk '{print $1}')
+ export PRINTER=$(cat ${TMP})
+ echo "PRINTER=${PRINTER}"
+ rm -f ${TMP}
+ lpq
+}
+
######################################################################
function prompt_command () {
*)
if [[ ${PATTERN} ]]; then
+ # If we already have the pattern to match in the
+ # message, get the new argument as a pattern for the
+ # filename
if [[ ${FILE_PATTERN} ]]; then
usage
exit 1
fi
[[ ${FILE_PATTERN} ]] || FILE_PATTERN="${MAIL_ARCHIVE_DIR}/*/*/*"
-[[ ${SIZE_FILE_PATTERN} ]] || SIZE_FILE_PATTERN="${MAIL_ARCHIVE_DIR}/"
+[[ ${SIZE_FILE_PATTERN} ]] || SIZE_FILE_PATTERN="${MAIL_ARCHIVE_DIR}"
SIZE=$(\dus ${SIZE_FILE_PATTERN} | cut -f 1 -d" ")