OSDN Git Service

Create patch script for 1.5.3 and gneral
authorumorigu <umorigu@gmail.com>
Mon, 22 Nov 2021 14:09:09 +0000 (23:09 +0900)
committerumorigu <umorigu@gmail.com>
Mon, 22 Nov 2021 14:09:09 +0000 (23:09 +0900)
.gitignore [new file with mode: 0644]
create_patch.sh [new file with mode: 0755]
create_patch_153.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..7999b04
--- /dev/null
@@ -0,0 +1,4 @@
+/_pukiwiki-*
+/_build_package_*
+
+
diff --git a/create_patch.sh b/create_patch.sh
new file mode 100755 (executable)
index 0000000..63fa429
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#usage: REV4=b44c SUFFIX=rc2 PREV=1.5.3 NEW=1.5.4 /path/to/create_patch.sh
+
+set -uex
+
+echo REV4: $REV4
+echo SUFFIX: $SUFFIX
+
+# Unzip all
+for f in $(ls *.zip); do
+  echo $f
+  unzip $f
+done
+
+no_exit_diff()
+{
+    set +e
+    diff $@
+    set -e
+}
+
+# Create patch packages
+# PREV=1.5.3
+# NEW=1.5.4
+P2N=${PREV//./}to${NEW//./} # 153to154
+
+no_exit_diff -urN pukiwiki-${PREV}_utf8 pukiwiki-${NEW}_utf8 > update_pukiwiki_${P2N}_utf8.patch
+no_exit_diff -urN pukiwiki-${PREV}_eucjp pukiwiki-${NEW}_eucjp > update_pukiwiki_${P2N}_eucjp.patch
+zip update_pukiwiki_${P2N}_utf8.patch.zip update_pukiwiki_${P2N}_utf8.patch
+zip update_pukiwiki_${P2N}_eucjp.patch.zip update_pukiwiki_${P2N}_eucjp.patch
+cp -p update_pukiwiki_${P2N}_utf8.patch.zip update_pukiwiki_${P2N}${SUFFIX}-${REV4}_utf8.patch.zip
+cp -p update_pukiwiki_${P2N}_eucjp.patch.zip update_pukiwiki_${P2N}${SUFFIX}-${REV4}_eucjp.patch.zip
+
diff --git a/create_patch_153.sh b/create_patch_153.sh
new file mode 100755 (executable)
index 0000000..38be695
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#usage: REV4=b44c SUFFIX=rc2 /path/to/create_patch_153.sh
+
+set -uex
+
+echo REV4: $REV4
+echo SUFFIX: $SUFFIX
+
+# Unzip all
+for f in $(ls *.zip); do
+  echo $f
+  unzip $f
+done
+
+no_exit_diff()
+{
+    set +e
+    diff $@
+    set -e
+}
+
+# Create patch packages
+no_exit_diff -urN pukiwiki-1.5.2_utf8 pukiwiki-1.5.3_utf8 > update_pukiwiki_152to153_utf8.patch
+no_exit_diff -urN pukiwiki-1.5.2_eucjp pukiwiki-1.5.3_eucjp > update_pukiwiki_152to153_eucjp.patch
+zip update_pukiwiki_152to153_utf8.patch.zip update_pukiwiki_152to153_utf8.patch
+zip update_pukiwiki_152to153_eucjp.patch.zip update_pukiwiki_152to153_eucjp.patch
+cp -p update_pukiwiki_152to153_utf8.patch.zip update_pukiwiki_152to153${SUFFIX}-${REV4}_utf8.patch.zip
+cp -p update_pukiwiki_152to153_eucjp.patch.zip update_pukiwiki_152to153${SUFFIX}-${REV4}_eucjp.patch.zip
+