fetch.sh (545B)
1 set -e 2 3 dir=$1 4 shift 5 6 cd "$dir" 7 8 if [ -e src ] ; then 9 rm -rf src 10 fi 11 12 if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then 13 curl -L -K url -O 14 sh "$OLDPWD/scripts/checksum.sh" -c sha256 15 fi 16 17 read -r _ archive <sha256 18 sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^[^/]*,src,' \ 19 'linux-*/Makefile' \ 20 'linux-*/arch/*/include/uapi' \ 21 'linux-*/arch/*/syscalls' \ 22 'linux-*/include/uapi' \ 23 'linux-*/scripts/unifdef.c' 24 25 if [ -d patch ] ; then 26 git apply -v --whitespace=nowarn --directory "$dir/src" patch/* 27 fi