tAdded an option to upload images - scripts - various script and utils
(HTM) git clone git://z3bra.org/scripts
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit c4424e2cb4057a3180d61517d39bfddda1f846e6
(DIR) parent 44eabbf4dc10157834c824a01c282b04f35e237a
(HTM) Author: Willy Goiffon <w.goiffon@gmail.com>
Date: Tue, 3 Sep 2013 16:38:39 +0200
Added an option to upload images
Diffstat:
M instagram | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/instagram b/instagram
t@@ -1,19 +1,25 @@
#!/bin/bash
-SSHOT_DIR=~/usr/img/scrn
+IMAGE_DIR=~/usr/img
+SSHOT_DIR=$(IMAGE_DIR)/wm
function usage() {
echo 'help!'
}
+function upload() {
+ ~/bin/upload $1
+}
+
[[ $# -eq 0 ]] && exit 1
if [ $# -gt 1 ]; then
- while getopts ":tms:o:h" opt; do
+ while getopts ":tmus:h" opt; do
case $opt in
t) THUMB=1 ;;
m) MULTI=1 ;;
s) SCREEN=$OPTARG ;;
+ u) UPLOAD=1 ;;
h) usage ; exit ;;
\?) echo "invalid option: -$OPTARG"; exit 1 ;;
esac
t@@ -39,8 +45,11 @@ if [[ "$MULTI" = "1" ]] || [[ -n $SCREEN ]]; then
done
else
-
import -window root $SSHOT_DIR/$1
[[ -n $THUMB ]] && import -window root -thumbnail 25% $SSHOT_DIR/thumb-$1
+fi
+if [[ "$UPLOAD" = "1" ]]; then
+ cd $(IMAGE_DIR)
+ upload wm/$1
fi