opkg

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

fetch.sh (657B)


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