Last active
February 17, 2017 16:33
-
-
Save tuna-f1sh/8313ec64a9def430422849d7c1f36d43 to your computer and use it in GitHub Desktop.
Convert Atmel Studio auto Makefile to Unix based one
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/sh | |
# @j_whittington | |
# | |
# Script to convert makefile generate from atmel studio 7 (windows) | |
# to linux path, assuming that you have gcc on PATH | |
# | |
# based on https://gist.github.com/theterg/6082389 | |
# GPL | |
CONFIG_NAME=$1 | |
if [ "$CONFIG_NAME" != "" ]; then | |
TARGET_DIR=${CONFIG_NAME} | |
# remove ref to gcc windows path | |
sed -i '' 's/C:\\.*\\bin\\//g' $TARGET_DIR/Makefile | |
# remove ref to extension .bin | |
sed -i '' 's/.exe//g' $TARGET_DIR/Makefile | |
# remove SHELL | |
sed -i '' 's/SHELL := cmd//g' $TARGET_DIR/Makefile | |
else | |
echo "Usage: studio_linux_conversion.sh BUILD_CONFIG (e.g. Debug/Release as standard *MUST HAVE BUILT ONCE IN AS*)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment