Diff of /bin/set_version.sh [28d661] .. [c16582] Maximize Restore

  Switch to unified view

a/bin/set_version.sh b/bin/set_version.sh
...
...
58
echo $NEW_VERSION > VERSION
58
echo $NEW_VERSION > VERSION
59
59
60
#
60
#
61
# update the file kwave.lsm
61
# update the file kwave.lsm
62
#
62
#
63
cat kwave.lsm | awk -v newver=$NEW_VERSION -v newdate="$NEW_DATE" '{ 
63
cat kwave.lsm | awk -v newver=$NEW_VERSION \
64
  -v newdate=`date --date=$NEW_DATE +%d%b%Y` '{ 
64
    split($0, a, ":") } {
65
    split($0, a, ":") } {
65
    if (a[1] == "Version") {
66
    if (a[1] == "Version") {
66
        printf("Version:\t%s\n", newver)
67
        printf("Version:\t%s\n", newver)
67
    } else
68
    } else
68
    if (a[1] == "Entered-date") {
69
    if (a[1] == "Entered-date") {
69
        printf("Entered-date:\t%s\n", newdate)
70
        printf("Entered-date:\t%s\n", toupper(newdate))
70
    } else 
71
    } else 
71
        print $0
72
        print $0
72
    }' > kwave.lsm.new
73
    }' > kwave.lsm.new
73
mv kwave.lsm /tmp/kwave.lsm.old
74
mv kwave.lsm /tmp/kwave.lsm.old
74
mv kwave.lsm.new kwave.lsm
75
mv kwave.lsm.new kwave.lsm
75
76
76
#
77
#
77
# update plugins/dialogs/about/module.h
78
# update plugins/dialogs/about/module.h
78
#
79
#
79
SHORT_DATE=`(LANG=en; date -d "$NEW_DATE" +"%b %d, %Y")`
80
SHORT_DATE=`(LANG=en; date -d "$NEW_DATE" +"%b %d, %Y")`
80
cat plugins/dialogs/about/module.h | \
81
cat plugins/dialogs/about/AboutDialog.cpp | \
81
    awk -v newver=$NEW_VERSION -v newdate="$SHORT_DATE" '{ 
82
    awk -v newver=$NEW_VERSION -v newdate="$SHORT_DATE" '{ 
82
    split($0, a, " ") } {
83
    split($0, a, " ") } {
83
    if ((a[1] == "#define") && (a[2] == "VERSION")) {
84
    if ((a[1] == "#define") && (a[2] == "KWAVE_VERSION")) {
84
        printf("#define VERSION \"%s\"\n", newver)
85
        printf("#define KWAVE_VERSION \"%s\"\n", newver)
85
    } else 
86
    } else 
86
    if ((a[1] == "#define") && (a[2] == "VERSION_DATE")) {
87
    if ((a[1] == "#define") && (a[2] == "KWAVE_VERSION_DATE")) {
87
        printf("#define VERSION_DATE \"%s\"\n", newdate)
88
        printf("#define KWAVE_VERSION_DATE \"%s\"\n", newdate)
88
    } else
89
    } else
89
        print $0
90
        print $0
90
  }' > module.h.new
91
  }' > AboutDialog.cpp.new
91
mv plugins/dialogs/about/module.h /tmp/module.h.old
92
mv plugins/dialogs/about/AboutDialog.cpp /tmp/AboutDialog.cpp.old
92
mv module.h.new plugins/dialogs/about/module.h
93
mv AboutDialog.cpp.new plugins/dialogs/about/AboutDialog.cpp
93
94
94
echo "new version numbers set."
95
echo "new version numbers set."
95
96
96
#
97
#
97
# end of file
98
# end of file