Skip to content

Instantly share code, notes, and snippets.

@tetov
Created February 20, 2019 19:53
Show Gist options
  • Save tetov/46455b5b4261777fe13e63401b718076 to your computer and use it in GitHub Desktop.
Save tetov/46455b5b4261777fe13e63401b718076 to your computer and use it in GitHub Desktop.
Copy gcode to SD card on WSL.
#! /bin/env sh
# run with sudo
SDLETTER=$(echo $1 | tr '[:upper:]' '[:lower:]')
GCODE=$2
SDPATH="/mnt/$SDLETTER/"
GCODEPATH="$PWD/$GCODE"
mkdir $SDPATH
mount -t drvfs "$SDLETTER": $SDPATH
cp -i "$GCODEPATH" "$SDPATH"
umount $SDPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment