opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

fetch-curl.sh (485B)


      1 set -e
      2 
      3 if [ "$#" != 1 ] ; then
      4 	echo 'usage: fetch-curl.sh dir' >&2
      5 	exit 2
      6 fi
      7 
      8 dir=$1
      9 shift
     10 
     11 cd "$dir"
     12 
     13 if [ -e src ] ; then
     14 	rm -rf src
     15 fi
     16 
     17 if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then
     18 	curl -L -K url -O
     19 	sh "$OLDPWD/scripts/checksum.sh" -c sha256
     20 fi
     21 
     22 while read -r _ archive ; do
     23 	sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^[^/]*,src,' '*/*'
     24 done <sha256
     25 
     26 if [ -d patch ] ; then
     27 	git apply -v --whitespace=nowarn --directory "$dir/src" patch/*.patch
     28 fi