Skip to content

Instantly share code, notes, and snippets.

@non7top
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save non7top/7f891993da711cde74f2 to your computer and use it in GitHub Desktop.
Save non7top/7f891993da711cde74f2 to your computer and use it in GitHub Desktop.
Update bash ubuntu
# http://unix.stackexchange.com/a/157714
export MINOR=3
mkdir -p /usr/local/src/dist && cd /usr/local/src/dist
wget http://ftpmirror.gnu.org/bash/bash-4.${MINOR}.tar.gz.sig
wget http://ftpmirror.gnu.org/bash/bash-4.${MINOR}.tar.gz
wget http://tiswww.case.edu/php/chet/gpgkey.asc
gpg --import gpgkey.asc
gpg --verify bash-4.${MINOR}.tar.gz.sig
cd ..
rm -rf bash-4.${MINOR}
tar xzvf dist/bash-4.${MINOR}.tar.gz
cd bash-4.${MINOR}
mkdir patches && cd patches
wget -r --no-parent --accept "bash4${MINOR}-*" -nH -nd \
ftp.heanet.ie/mirrors/gnu/bash/bash-4.${MINOR}-patches/ # Use a local mirror
echo *sig | xargs -n 1 gpg --verify --quiet # see note 2
cd ..
echo patches/bash4${MINOR}-0?? | xargs -n 1 patch -p0 -i # see note 3 below
./configure --prefix=/usr --bindir=/bin \
--docdir=/usr/share/doc/bash-4.${MINOR} \
--without-bash-malloc \
--with-installed-readline
bison -y -d parse.y || { echo "Please install bison"; exit 1; }
rm builtins/evalstring.o builtins/libbuiltins.a
make
# make test && make install
checkinstall
curl https://raw.githubusercontent.com/hannob/bashcheck/master/bashcheck -o bashcheck
bash bashcheck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment