inkstitch/bin/embroider

22 wiersze
498 B
Bash
Executable File

#!/bin/bash
# /etc/fstab entry: /dev/disk/by-id/usb-B-EMB_USB_RAM_Disk_INST_0-0:0-part1 /mnt/embroidery vfat user,uid=1000,gid=1000,nobootwait,noauto 0 0
set -e
if [[ "$1" == *.csv ]]; then
pes=$(mktemp /tmp/XXXXXXXXXXX.pes)
libembroidery-convert "$1" "$pes"
file="$pes"
else
file="$1"
fi
(
mount /mnt/embroidery && \
rm -f /mnt/embroidery/* && \
cp $file /mnt/embroidery/embroidery.pes && \
umount /mnt/embroidery
) || echo '(local) failed to upload embroidery :('