Changeset 2044


Ignore:
Timestamp:
07/19/12 15:41:01 (12 years ago)
Author:
sanmai
Message:
  • Fix a bug that was not noticed before because it happened not to disrupt the script ($KML/Z_file_relpath).
  • Copy final KMZ file to a location for publication on the public DoBeS website.
Location:
CLARIN_KML
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLARIN_KML

    • Property svn:ignore
      •  

        old new  
         1.input
        12.output
  • CLARIN_KML/exec/generate_CLARIN_KMZ.sh

    r2043 r2044  
    5050KML_final_file_path="${OUTPUT_directory_path}/doc.kml";
    5151KMZ_final_file_path="${OUTPUT_directory_path}/language_sites.kmz";
     52KMZ_publication_directory_path='/var/www/drupal/external/kml/';
    5253
    5354timestamp=$( date +%H:%M:%S );
     
    7879fi
    7980
    80 if test -r "${OUTPUT_directory_path}" -a -r "${SAXON_JAR_file_path}" -a -x "${CSV2XML_file_path}" -a -r "${XSLT_1_file_path}" -a -r "${XSLT_1_file_path}" -a -r "${XSLT_2_file_path}" -a -r "${XSLT_3_file_path}"
     81if test -r "${OUTPUT_directory_path}" -a -r "${SAXON_JAR_file_path}" -a -x "${CSV2XML_file_path}" -a -r "${XSLT_1_file_path}" -a -r "${XSLT_1_file_path}" -a -r "${XSLT_2_file_path}" -a -r "${XSLT_3_file_path}" -a -r "${KMZ_publication_directory_path}"
    8182then
    8283        if test -r "${KMZ_original_file_path}" -a -r "${CSV_file_path}"
     
    115116                fi
    116117
    117                 echo -e "\n\n${bold}Zipping doc.kml to KMZ file ${KMZ_final_file_path} ...${normal}";
     118                echo -e "\n\n${bold}Zipping ${KML_final_file_path} to KMZ file ${KMZ_final_file_path} and moving it to "${KMZ_publication_directory_path}" ...${normal}";
    118119                cd $(dirname "${KML_final_file_path}");
    119                 KMZ_final_file_relpath=$(basename "${KML_final_file_path}");
     120                KML_final_file_relpath=$(basename "${KML_final_file_path}");
    120121
    121                 zip -9 -D "${KMZ_final_file_path}" "${KMZ_final_file_relpath}"; # X- path corruption! --junk-paths --no-dir-entries -X
     122                zip -9 -D "${KMZ_final_file_path}" "${KML_final_file_relpath}";
    122123
    123                 rm "${KMZ_final_file_relpath}";
     124                rm "${KML_final_file_relpath}";
    124125                rm "${KML_original_file_path}";
     126
     127                cp -v --remove-destination "${KMZ_final_file_path}" -t "${KMZ_publication_directory_path}/";
    125128        else
    126129                echo -e "ERROR: The input data file(s) ${KMZ_original_file_path}\nand/or\n${CSV_file_path} is/are not existent as well as readable/executable!";
     
    128131        fi
    129132else
    130         echo -e "ERROR: One or more of the following script files is not existent as well as readable: \n${OUTPUT_directory_path}\n${SAXON_JAR_file_path}\n${CSV2XML_file_path}\n${XSLT_1_file_path}\n${XSLT_1_file_path}\n${XSLT_2_file_path}\n${XSLT_3_file_path}";
     133        echo -e "ERROR: One or more of the following script files is not existent as well as readable: \n${OUTPUT_directory_path}\n${SAXON_JAR_file_path}\n${CSV2XML_file_path}\n${XSLT_1_file_path}\n${XSLT_1_file_path}\n${XSLT_2_file_path}\n${XSLT_3_file_path}\n${KMZ_publication_directory_path}";
    131134        exit 2;
    132135fi
Note: See TracChangeset for help on using the changeset viewer.