]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
allow the tempdir to be a hardlink structure (i.e. don't change files in there, alway...
authorRudolf Polzer <divVerent@xonotic.org>
Fri, 27 May 2011 07:45:43 +0000 (09:45 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 27 May 2011 07:45:43 +0000 (09:45 +0200)
all
misc/tools/cached-converter.sh

diff --git a/all b/all
index bcb963ea1e6f906de6bcf0c3bd670efb2d6eb475..d3e42d3503d0f7f973be90ad7739880fcf3389fb 100755 (executable)
--- a/all
+++ b/all
@@ -1833,11 +1833,12 @@ case "$cmd" in
                                        versionstr="$versionstr$RELEASETYPE"
                                        ;;
                        esac
-                       verbose sed -i "
+                       verbose sed "
                                s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
                                s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/;
                                s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/;
-                       " defaultXonotic.cfg
+                       " < defaultXonotic.cfg > defaultXonotic.cfg.new
+                       mv defaultXonotic.cfg.new defaultXonotic.cfg
                        case "$RELEASETYPE" in
                                release)
                                        echo "" >> defaultXonotic.cfg
@@ -1847,6 +1848,7 @@ case "$cmd" in
                        esac
                        (
                                verbose cd gfx/menu/luminos
+                               verbose rm -f background_l2.tga background_ingame_l2.tga
                                verbose cp "$d0"/mediasource/gfx/menu/luminos_versionbuilder/background_l2.svg .
                                verbose "$d0"/mediasource/gfx/menu/luminos_versionbuilder/versionbuilder "$versionstr"
                                verbose rm background_l2.svg
index d50348fcc162578cf6c8fca72d14f89a5831018c..d59ff8a03d5f88b0dc8c70d8f700e1fe10d6630c 100755 (executable)
@@ -76,14 +76,14 @@ cached()
        tempfile1="${name1%/*}/new-${name1##*/}"
        [ -z "$outfile2" ] || tempfile2="${name2%/*}/new-${name2##*/}"
        if [ -f "$name1" ] && { [ -z "$outfile2" ] || [ -f "$name2" ]; }; then
-               case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln -f "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"; }
-               [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln -f "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"; }; }
+               case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln -f "$name1" "$outfile1" 2>/dev/null || { rm -f "$outfile1" && cp "$name1" "$outfile1"; }; }
+               [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln -f "$name2" "$outfile2" 2>/dev/null || { rm -f "$outfile2" && cp "$name2" "$outfile2"; }; }; }
                conv=true
        elif "$method" "$infile1" "$infile2" "$tempfile1" "$tempfile2" "$@"; then
                mv "$tempfile1" "$name1"
                [ -z "$outfile2" ] || mv "$tempfile2" "$name2"
-               case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln -f "$name1" "$outfile1" 2>/dev/null || cp "$name1" "$outfile1"; }
-               [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln -f "$name2" "$outfile2" 2>/dev/null || cp "$name2" "$outfile2"; }; }
+               case "$outfile1" in */*) mkdir -p "${outfile1%/*}"; esac && { ln -f "$name1" "$outfile1" 2>/dev/null || { rm -f "$outfile1" && cp "$name1" "$outfile1"; }; }
+               [ -z "$outfile2" ] || { case "$outfile2" in */*) mkdir -p "${outfile2%/*}"; esac && { ln -f "$name2" "$outfile2" 2>/dev/null || { rm -f "$outfile2" && cp "$name2" "$outfile2"; }; }; }
                conv=true
        else
                rm -f "$tempfile1"