logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

fetch-curl.sh (479B)


  1. set -e
  2. if [ "$#" != 1 ] ; then
  3. echo 'usage: fetch-curl.sh dir' >&2
  4. exit 2
  5. fi
  6. dir=$1
  7. shift
  8. cd "$dir"
  9. if [ -e src ] ; then
  10. rm -rf src
  11. fi
  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. while read -r _ archive ; do
  17. sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^[^/]*,src,'
  18. done <sha256
  19. if [ -d patch ] ; then
  20. git apply -v --whitespace=nowarn --directory "$dir/src" patch/*.patch
  21. fi