Ignore:
Timestamp:
2009-06-17T18:34:35+02:00 (15 years ago)
Author:
joerg
Message:

Do not automatically cleanup before building a debian package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/debian/make_install_files.sh

    r13391 r15969  
    1212do_update_plugins=true
    1313do_remove_jar=true
     14do_cleanup=true
    1415
    1516for arg in "$@" ; do
    1617    case $arg in
    1718        --dest-path=*) # Destination path to install the final *.jar Files
    18         dst_path=${arg#*=}
    19         ;;
     19            dst_path=${arg#*=}
     20            ;;
    2021       
    2122        --no-update-icons) # Do not update icons
     
    3839            do_remove_jar=false
    3940            ;;
    40        
     41
     42        --no-clean) # no cleanup before build
     43            do_cleanup=false
     44            ;;
     45
    4146        *)
    4247            echo ""
     
    125130# Remove Old Jar Files in dist/*.jar
    126131
    127 $do_remove_jar && rm -f dist/*.jar
    128 $do_remove_jar && rm -f plugins/*/dist/*.jar
     132$do_cleanup && {
     133    $do_remove_jar && rm -f dist/*.jar
     134    $do_remove_jar && rm -f plugins/*/dist/*.jar
     135    }
    129136
    130137# ------------------------------------------------------------------
     
    133140    echo "------------- Compile Josm"
    134141    cd core
    135     ant -q clean 2>build.err
     142    $do_cleanup && ant -q clean 2>build.err
    136143    ant -q dist >>build.log 2>>build.err
    137144    rc=$?
     
    148155    echo "------------- Compile Josm Plugin webkit-image for wmsplugin"
    149156    cd plugins/wmsplugin
    150     make clean
     157    $do_cleanup &&     make clean
    151158    make
    152159    cd ../..
     
    165172        cd $dir
    166173        echo -n -e "----- $dir\r"
    167         $do_remove_jar && rm -f dist/*.jar
    168         $do_remove_jar && rm -f ../../dist/$dir.jar
    169         rm -f *.log
    170         echo "ant clean" >build.log
    171         echo "ant clean" >build.err
    172         ant -q clean >>build.log 2>>build.err
     174        $do_cleanup && {
     175            $do_remove_jar && rm -f dist/*.jar
     176            $do_remove_jar && rm -f ../../dist/$dir.jar
     177            rm -f *.log
     178            echo "ant clean" >build.log
     179            echo "ant clean" >build.err
     180            ant -q clean >>build.log 2>>build.err
     181        }
    173182        echo "ant dist" >>build.log
    174183        echo "ant dist" >>build.err
     
    213222    echo "------------- Compile Josm-ng"
    214223    cd ../josm-ng
    215     ant -q clean
     224    $do_cleanup && ant -q clean
    216225    ant -q josm-ng-impl.jar  >>build.log 2>>build.err
    217226    rc=$?
     
    263272# Copy words.cfg for spelling
    264273mkdir -p "$jar_path/speller"
    265 cp ../../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/"
    266 
    267 # ------------------------------------------------------------------
    268 cp "debian/bin/josm.sh" "$bin_path/josm" || exit -1
     274cp ../../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/" || {
     275    echo "!!!!!!!!!! words.cfg is missing"
     276    exit -1
     277}
     278
     279
     280# ------------------------------------------------------------------
     281cp "debian/bin/josm.sh" "$bin_path/josm" || {
     282    echo "!!!!!!!!!! josm.sh is missing"
     283    exit -1
     284}
     285
    269286cp "debian/bin/josm-ng.sh" "$bin_path/josm-ng" || {
    270287    echo "!!!!!!!!!!!!!!!!! WARNING Josm-NG is not included into the package"
     
    273290
    274291# add plugins to default preferences
    275 sed "s/PLUGIN_LIST/$plugins/;" <debian/bin/preferences >"$jar_path/preferences"
     292sed "s/PLUGIN_LIST/$plugins/;" <debian/bin/preferences >"$jar_path/preferences" || {
     293    echo "!!!!!!!! WARNING cannot create preferences"
     294    exit -1
     295}
     296   
    276297
    277298# Copy default Bookmarks
    278299cp nsis/bookmarks "$jar_path/bookmarks"
     300
     301exit 0
Note: See TracChangeset for help on using the changeset viewer.