Created
February 20, 2019 19:53
-
-
Save tetov/46455b5b4261777fe13e63401b718076 to your computer and use it in GitHub Desktop.
Copy gcode to SD card on WSL.
This file contains 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
#! /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