From 334c2f60810cc57708a2c374969361ad139c13fe Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Tue, 19 Mar 2013 02:12:45 -0700 Subject: [PATCH] db updates --- agg | 11 +++++++---- agg.db | Bin 3072 -> 3072 bytes 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/agg b/agg index 7ce4f68..cf297f4 100755 --- a/agg +++ b/agg @@ -56,13 +56,13 @@ if [[ "ul" = $ACTION && $FILE ]]; then echo -ne $c_yellow"title\t"$c_end; read -r TITLE echo -ne $c_yellow"desc\t"$c_end; read -r DESC #printf -v DESC "%q" "$DESC" - URL="$S3_URL$FOLDER$FILE" + # get filename + FILENAME=$(basename $FILE) + URL="$S3_URL$FOLDER$FILENAME" sqlite3 "$DB" "INSERT INTO entries (link, title, desc, url, mimetype) VALUES ('$LINK','$TITLE','$DESC', '$URL', '$mimetype')"; # upload file to s3 echo -e $c_green"Uploading to s3..."$c_end - # get filename - FILENAME=$(basename $FILE) # put file on s3 s3cmd put -v --acl-public --guess-mime-type "$FILE" "$S3_BUCKET$FOLDER$FILENAME" @@ -71,5 +71,8 @@ if [ "pull-data" = $ACTION ]; then s3cmd get -v "$S3_BUCKET$DB" fi if [ "push-data" = $ACTION ]; then - s3cmd put -v --guess-mime-type "$DB" "$S3_BUCKET$DB" + echo -e "$c_green"Uploading data to s3"$c_end" + s3cmd put -v --acl-public --guess-mime-type "$DB" "$S3_BUCKET$DB" + echo -e "$c_green"Pulling new DB to quilime"$c_end" + ssh quilime@quilime.com "cd ~/media.quilime.com/vid/; curl -O http://agg.s3.amazonaws.com/agg.db" fi diff --git a/agg.db b/agg.db index 502c94fcaef382d1819db8bc551c455db29c110a..df9337111698b5c520edb2f936e89708218185f8 100644 GIT binary patch delta 134 zcmZpWXpop7&B#7c#+i|QW5N<<4kl)A2IghV-kSwkG?^JoCOV3$MzU})81u^Vrpp@{ z7#iyu80#8ZDi~N=85&s`7$#TdCYEF-7f(LJE+^rXTi_cI<(wW|R;-s>U{aQulA5m% lWK3Shp1|^%f%)@hL5|1F69d?Ixfz+I8B_C0iZWA+Spc~KBtifH delta 59 zcmZpWXpop7&B!!S#+i|6W5N< OW@*mUypp2K)M5bRJP@w{ -- 2.34.1