Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

upgrade.sh 623B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. set -e
  3. src_tarball=$(ls /usr/src/linux-source-* |sort -V | tail -n1)
  4. version=$(basename "$src_tarball" |sed -e 's/^linux-source-//' -e 's/\.tar\.xz//')
  5. tarball_hash=.debian_src_tarball.sha512
  6. src_dir=$(realpath linux-source)
  7. if [ -d "$src_dir" -a -L "linux-source" ]
  8. then
  9. if sha512sum -c "$tarball_hash"
  10. then
  11. exit 0
  12. fi
  13. if [ "$1" = "check" ]
  14. then
  15. exit 1
  16. fi
  17. make commit-config || true
  18. rm -Rf "$src_dir" || true
  19. rm "linux-source" || true
  20. elif [ "$1" = "check" ]
  21. then
  22. exit 1
  23. fi
  24. tar -xvf "$src_tarball"
  25. ln -vs "linux-source-${version}" "linux-source"
  26. sha512sum "$src_tarball" > "$tarball_hash"