3 # Uncomment for debugging.
17 # TBD: figure out what to do about these paths.
18 export EC2_HOME
=~
/jdarcy
/ec2-api-tools-1.3
-53907
19 export PATH
=$PATH:$EC2_HOME/bin
22 tmpdir
=$
(mktemp
-d -p $PWD/$bucket)
23 trap "rm -rf $tmpdir" EXIT
25 bundle_args
="--batch --arch x86_64 -c $cert_file -k $key_file -u $api_uid"
26 if [ "$kernel" != "_default_" ]; then
27 bundle_args
="$bundle_args --kernel $kernel"
29 if [ "$ramdisk" != "_default_" ]; then
30 bundle_args
="$bundle_args --ramdisk $ramdisk"
32 $ECHO ec2-bundle-image
-i $bucket/$object -d $tmpdir $bundle_args
34 echo "ERROR bundling_failed"
35 echo ec2-bundle-image
-i $bucket/$object -d $tmpdir $bundle_args
39 upload_args
="--batch --retry -b $ami_bkt -a $api_key -s $api_secret"
40 $ECHO ec2-upload-bundle
-m $tmpdir/$object.manifest.xml
$upload_args
42 echo "ERROR uploading_failed"
43 echo ec2-upload-bundle
-m $tmpdir/$object.manifest.xml
$upload_args
47 register_args
="-C $cert_file -K $key_file"
48 $ECHO ec2-register
$register_args $ami_bkt/$object.manifest.xml
-n $object
50 echo "ERROR registration_failed"
51 echo ec2-register
$register_args $ami_bkt/$object.manifest.xml
-n $object