From: <abe...@us...> - 2012-03-03 00:39:22
|
Revision: 5476 http://astlinux.svn.sourceforge.net/astlinux/?rev=5476&view=rev Author: abelbeck Date: 2012-03-03 00:39:15 +0000 (Sat, 03 Mar 2012) Log Message: ----------- admin file upload support changed to s3cmd for Amazon S3 Modified Paths: -------------- branches/1.0/scripts/master-upload branches/1.0/scripts/upload_script.sh Removed Paths: ------------- branches/1.0/scripts/ncftpput branches/1.0/toolchain/ncftpput Modified: branches/1.0/scripts/master-upload =================================================================== --- branches/1.0/scripts/master-upload 2012-03-01 23:49:31 UTC (rev 5475) +++ branches/1.0/scripts/master-upload 2012-03-03 00:39:15 UTC (rev 5476) @@ -3,23 +3,25 @@ # master-upload input_path # -MIRROR_IMG_PATH="/downloads/img" +MIRROR_IMG_PATH="downloads/img" -MIRROR_FIRMWARE_PATH="/firmware-1.x" +MIRROR_FIRMWARE_PATH="firmware-1.x" -MIRROR_FIRMWARE_PATH_18="/ast18-firmware-1.x" +MIRROR_FIRMWARE_PATH_18="ast18-firmware-1.x" input_path="$1" -auth_file="$HOME/.astlinux-ftp-repo" +auth_file="$HOME/.s3cfg" success_count=0 upload_file() { - local remote_dir="$1" file="$2" count="$3" + local remote_dir="$1" files="$2" count="$3" IFS=' ' file - ./toolchain/ncftpput -f "$auth_file" -z -r10 "$remote_dir" $file + for file in $files; do + s3cmd put "$file" "s3://astlinuxmirror/$remote_dir/${file##*/}" + done if [ $? -eq 0 ]; then if [ "$count" = "count" ]; then @@ -100,16 +102,6 @@ exit 1 fi -upload_host="$(cat "$auth_file" | awk '/^host / { print $2 }')" -upload_user="$(cat "$auth_file" | awk '/^user / { print $2 }')" -upload_pass="$(cat "$auth_file" | awk '/^pass / { print $2 }')" - -if [ -z "$upload_host" -o -z "$upload_user" -o -z "$upload_pass" ]; then - echo "master-upload: host/user/pass missing in \"$auth_file\"" - exit 1 -fi -unset upload_pass - # Upload Asterisk 1.4 .tar.gz run images upload_run_images "$input_path/firmware-1.x" "$MIRROR_FIRMWARE_PATH" Deleted: branches/1.0/scripts/ncftpput =================================================================== (Binary files differ) Modified: branches/1.0/scripts/upload_script.sh =================================================================== --- branches/1.0/scripts/upload_script.sh 2012-03-01 23:49:31 UTC (rev 5475) +++ branches/1.0/scripts/upload_script.sh 2012-03-03 00:39:15 UTC (rev 5476) @@ -7,5 +7,5 @@ done if [ -z "$1" ]; then - scripts/ncftpput -z -r1000 -u astlinuxfiles files.astlinux.org / dl/* + s3cmd sync --exclude '*/*' -v dl/ s3://astlinuxfiles/ fi Deleted: branches/1.0/toolchain/ncftpput =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |