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"
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