From: Gabriel Dunne Date: Tue, 19 Mar 2013 09:12:45 +0000 (-0700) Subject: db updates X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=334c2f60810cc57708a2c374969361ad139c13fe;p=aggs3.git db updates --- 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 502c94f..df93371 100644 Binary files a/agg.db and b/agg.db differ