Last active
September 6, 2016 14:04
-
-
Save ivan/0205915d65346da2b26f17ea5605f42f to your computer and use it in GitHub Desktop.
Scripting in fish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't delete; linked to from https://ludios.org/fish-for-zsh-users/