Skip to content

Commit

Permalink
Updated zsh to 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ardagnir committed Jan 29, 2019
1 parent 8c55712 commit 005fa7b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ test/build
test/testrun
*.tar.bz2
*.tar.gz
*.tar.xz
*_patches
*_tmp
*.sw?
Expand Down
8 changes: 4 additions & 4 deletions zsh.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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();
Expand All @@ -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())
+ {
Expand All @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions zsh_athame_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 005fa7b

Please sign in to comment.