Last active
August 29, 2015 14:06
-
-
Save stevejenkins/3d64d3543060c1bcac92 to your computer and use it in GitHub Desktop.
A quick script file for downloading an applying multiple patches when manually compiling GNU bash on Linux. Referenced in this post: http://stevejenkins.com/blog/2014/09/how-to-manually-update-bash-to-patch-shellshock-bug-on-older-fedora-based-systems/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A quick script file for downloading an applying multiple patches when manually compiling GNU bash on Linux | |
# Written (mostly) by Steve Cook with (a little) help from Steve Jenkins | |
# This really seems like a lame way to have to do this, but it works. :) Use at your own risk. | |
# You can edit these variables | |
version="4.0" | |
nodotversion="40" | |
lastpatch="44" | |
# You probably don't want to edit anything below this line | |
for i in `seq 1 $lastpatch`; | |
do | |
number=$(printf %02d $i) | |
file="https://ftp.gnu.org/pub/gnu/bash/bash-${version}-patches/bash${nodotversion}-0$number" | |
echo $file | |
curl -k $file | patch -N -p0 | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
could an integrity check be added, too ? (gpg)