From 2cbc4427b8438a9126fc93fe6b506b81c2de81c5 Mon Sep 17 00:00:00 2001 From: umorigu Date: Sun, 16 Feb 2020 17:49:37 +0900 Subject: [PATCH] Create patch script --- create_patch_152.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 create_patch_152.sh diff --git a/create_patch_152.sh b/create_patch_152.sh new file mode 100755 index 0000000..d0899a0 --- /dev/null +++ b/create_patch_152.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +#usage: REV4=b44c SUFFIX=rc2 /path/to/create_patch_152.sh + +set -uex + +echo REV4: $REV4 +echo SUFFIX: $SUFFIX + +# Unzip all +for f in $(ls *.zip); do + echo $f + unzip $f +done + +# Prepare (UTF-8) +rm pukiwiki-1.5.1_utf8/cache/*.rel +rm pukiwiki-1.5.1_utf8/cache/*.ref +rm pukiwiki-1.5.1_utf8/cache/autolink.dat +rm pukiwiki-1.5.1_utf8/cache/entities.dat +rm pukiwiki-1.5.1_utf8/skin/pukiwiki.css.php +rm pukiwiki-1.5.1_utf8/skin/tdiary.css.php + +# Prepare (EUC-JP) +rm pukiwiki-1.5.1_eucjp/cache/*.rel +rm pukiwiki-1.5.1_eucjp/cache/*.ref +rm pukiwiki-1.5.1_eucjp/cache/autolink.dat +rm pukiwiki-1.5.1_eucjp/cache/entities.dat +rm pukiwiki-1.5.1_eucjp/skin/pukiwiki.css.php +rm pukiwiki-1.5.1_eucjp/skin/tdiary.css.php + +no_exit_diff() +{ + set +e + diff $@ + set -e +} + +# Create patch packages +no_exit_diff -urN pukiwiki-1.5.1_utf8 pukiwiki-1.5.2_utf8 > update_pukiwiki_151to152_utf8.patch +no_exit_diff -urN pukiwiki-1.5.1_eucjp pukiwiki-1.5.2_eucjp > update_pukiwiki_151to152_eucjp.patch +zip update_pukiwiki_151to152_utf8.patch.zip update_pukiwiki_151to152_utf8.patch +zip update_pukiwiki_151to152_eucjp.patch.zip update_pukiwiki_151to152_eucjp.patch +cp -p update_pukiwiki_151to152_utf8.patch.zip update_pukiwiki_151to152${SUFFIX}-${REV4}_utf8.patch.zip +cp -p update_pukiwiki_151to152_eucjp.patch.zip update_pukiwiki_151to152${SUFFIX}-${REV4}_eucjp.patch.zip + -- 2.11.0