shithub: treason

ref: 52f33c04acdec0e9123f9566f6eddfa86d707cdb
dir: /install.rc/

View raw version
#!/bin/rc
rfork ne
flag e +

cd ..

echo downloading and building dav1d
test -d dav1d || { hget https://git.sr.ht/~ft/dav1d/archive/master.tar.gz | tar xz && \
	mv dav1d-master dav1d && \
	cd dav1d/src && \
	mk && \
	cd ../../
}

echo downloading and building faad2
test -d faad2-master || { hget https://git.sr.ht/~ft/faad2/archive/master.tar.gz | tar xz && \
	cd faad2-master/libfaad && \
	mk install && \
	cd ../frontend && \
	mk install && \
	cd ../..
}

echo downloading and building openh264
test -d openh264 || { hget https://git.sr.ht/~ft/openh264/archive/master.tar.gz | tar xz && \
	mv openh264-master openh264 && \
	cd openh264/codec && \
	mk && \
	cd ../..
}

echo downloading and building libvpx
test -d libvpx || { hget https://git.sr.ht/~ft/libvpx/archive/master.tar.gz | tar xz && \
	mv libvpx-master libvpx && \
	cd libvpx && \
	mk && \
	cd ..
}

echo downloading and building mcfs
test -d mcfs-master || { hget https://git.sr.ht/~ft/mcfs/archive/master.tar.gz | tar xz && \
	cd mcfs-master && \
	mk install && \
	cd ..
}

echo downloading opus
test -d opus || { hget https://github.com/xiph/opus/archive/master.tar.gz | tar xz && \
	mv opus-master opus
}

echo downloading libopusenc
test -d libopusenc || { hget https://github.com/xiph/libopusenc/archive/master.tar.gz | tar xz && \
	mv libopusenc-master libopusenc
}

echo downloading opusfile
test -d opusfile || { hget https://github.com/xiph/opusfile/archive/master.tar.gz | tar xz && \
	mv opusfile-master opusfile
}

echo downloading opus-tools
test -d opus-tools || { hget https://github.com/xiph/opus-tools/archive/master.tar.gz | tar xz && \
	mv opus-tools-master opus-tools
}

echo downloading alienpatch and building all things opus
test -d alienpatch || { hget https://github.com/qwx9/alienpatch/archive/master.tar.gz | tar xz && \
	mv alienpatch-master alienpatch && \
	for(i in opus libopusenc opusfile opus-tools) { \
		cd $i; \
		ape/patch -p0 <../alienpatch/$i || echo failed; \
		mk install; \
		cd ..; \
	}
}

echo committing treason
cd treason && \
	mk install && \
	rm -rf ../^(dav1d faad2-master openh264 libvpx mcfs-master opus libopusenc opusfile opus-tools alienpatch)

echo treason has been committed