]> git.quilime.com - aggs3.git/commitdiff
db updates
authorGabriel Dunne <gdunne@quilime.com>
Tue, 19 Mar 2013 09:12:45 +0000 (02:12 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Tue, 19 Mar 2013 09:12:45 +0000 (02:12 -0700)
agg
agg.db

diff --git a/agg b/agg
index 7ce4f68ded4584455d46631225a71761e32cf7f5..cf297f43558f5f22ea1ceb49d6ff2d12bde0268a 100755 (executable)
--- 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 (file)
Binary files a/agg.db and b/agg.db differ