From 005fa7b4a06a8313bfb23f0c6d965d16f4df7b90 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 28 Jan 2019 19:59:19 -0500 Subject: [PATCH] Updated zsh to 5.7 --- .gitignore | 1 + zsh.patch | 8 ++++---- zsh_athame_setup.sh | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 9a975e8..e00ebec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ test/build test/testrun *.tar.bz2 *.tar.gz +*.tar.xz *_patches *_tmp *.sw? diff --git a/zsh.patch b/zsh.patch index 5080523..79dfe68 100644 --- a/zsh.patch +++ b/zsh.patch @@ -72,7 +72,7 @@ diff -ru a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c #include "zle_main.pro" #ifdef HAVE_POLL_H -@@ -1086,6 +1087,8 @@ +@@ -1097,6 +1098,8 @@ void zlecore(void) { @@ -81,7 +81,7 @@ diff -ru a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c Keymap km; #if !defined(HAVE_POLL) && defined(HAVE_SELECT) struct timeval tv; -@@ -1175,6 +1178,7 @@ +@@ -1186,6 +1189,7 @@ } popheap(); @@ -104,7 +104,7 @@ diff -ru a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c static int getkeybuf(int w) { -- int c = getbyte((long)w, NULL); +- int c = getbyte((long)w, NULL, 1); + int c; + if (athame_enabled()) + { @@ -117,7 +117,7 @@ diff -ru a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c + } + } + else { -+ c = getbyte((long)w, NULL); ++ c = getbyte((long)w, NULL, 1); + } if(c < 0) diff --git a/zsh_athame_setup.sh b/zsh_athame_setup.sh index dc8b19a..95bb796 100755 --- a/zsh_athame_setup.sh +++ b/zsh_athame_setup.sh @@ -112,34 +112,34 @@ fi #Download zsh if [ $redownload = 1 ]; then - rm -r zsh-5.5.1.tar.gz + rm -r zsh-5.7.tar.xz fi -if [ ! -f zsh-5.5.1.tar.gz ]; then - curl -O http://www.zsh.org/pub/zsh-5.5.1.tar.gz - head -n 3 zsh-5.5.1.tar.gz | grep "404 Not Found" > /dev/null +if [ ! -f zsh-5.7.tar.xz ]; then + curl -O http://www.zsh.org/pub/zsh-5.7.tar.xz + head -n 3 zsh-5.7.tar.xz | grep "404 Not Found" > /dev/null if [ $? -eq 0 ]; then - curl -O http://www.zsh.org/pub/old/zsh-5.5.1.tar.gz + curl -O http://www.zsh.org/pub/old/zsh-5.7.tar.xz fi fi -if [ "$(md5sum zsh-5.5.1.tar.gz 2>/dev/null)" != "678bc037a7311a46e7fc0adca7ed8266 zsh-5.5.1.tar.gz" ] && [ "$(md5 zsh-5.5.1.tar.gz 2>/dev/null)" != "MD5 (zsh-5.5.1.tar.gz) = 678bc037a7311a46e7fc0adca7ed8266" ]; then - #rm zsh-5.5.1.tar.gz +if [ "$(md5sum zsh-5.7.tar.xz 2>/dev/null)" != "4f855abd9be566bcb204e407cf571d09 zsh-5.7.tar.xz" ] && [ "$(md5 zsh-5.7.tar.xz 2>/dev/null)" != "MD5 (zsh-5.7.tar.xz) = 4f855abd9be566bcb204e407cf571d09" ]; then + #rm zsh-5.7.tar.xz echo "FAILED: Incorrect md5 hash" >&2 exit 1 fi -if [ ! -d zsh-5.5.1_tmp ]; then +if [ ! -d zsh-5.7_tmp ]; then dirty=0 fi #Unpack zsh dir if [ $dirty = 0 ]; then - rm -rf zsh-5.5.1_tmp - tar -xf zsh-5.5.1.tar.gz - mv zsh-5.5.1 zsh-5.5.1_tmp + rm -rf zsh-5.7_tmp + tar -xf zsh-5.7.tar.xz + mv zsh-5.7 zsh-5.7_tmp fi #Patch Zsh with Athame -cd zsh-5.5.1_tmp +cd zsh-5.7_tmp if [ $athame = 1 ]; then if [ $dirty = 0 ]; then ../athame_patcher.sh zsh .. || exit 1