keyboards/zorne/flash.sh

18 lines
341 B
Bash
Raw Normal View History

2021-04-12 16:24:12 -05:00
#!/usr/bin/env fish
test (whoami) != root && begin
echo must be root
exit 1
end
mkdir -p /tmp/flashmnt
echo Mounting $argv[1] to /tmp/flashmnt...
mount $argv[1] /tmp/flashmnt # arg 1
echo Copying $argv[2] to /tmp/flashmnt...
cp $argv[2] /tmp/flashmnt
echo Syncing...
sync
echo Unmounting /tmp/flashmnt...
umount /tmp/flashmnt
echo Done!