Instantly share code, notes, and snippets.

@ivan /
Last active Sep 6, 2016

What would you like to do?
Scripting in fish
set here (pwd)
and set out $here/ubuntils.deb
and set git_temp (mktemp -d)
and cd $git_temp; and git clone -q -b bien ~/code/system/ubuntils
and set deb_temp (mktemp -d)
and cd $deb_temp
and echo "2.0" > debian-binary
and mkdir -p control data/usr/bin
and rsync -a --delete $git_temp/ubuntils/bin/ data/usr/bin/
and rsync -a --delete $here/control/ control/
and chmod -R go-w $deb_temp/
and cd $deb_temp/data
and find . -type f -printf '%P\0' | xargs -0 md5sum > ../control/md5sums
and tar --owner=root --group=root -cJf ../data.tar.xz *
and cd $deb_temp/control
and tar --owner=root --group=root -czf ../control.tar.gz *
and cd $deb_temp
and rm -f $out
and ar -qc $out debian-binary control.tar.gz data.tar.xz

This comment has been minimized.


ivan commented Sep 6, 2016

Don't delete; linked to from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment