Skip to content

Instantly share code, notes, and snippets.

@tuna-f1sh
Last active February 17, 2017 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuna-f1sh/8313ec64a9def430422849d7c1f36d43 to your computer and use it in GitHub Desktop.
Save tuna-f1sh/8313ec64a9def430422849d7c1f36d43 to your computer and use it in GitHub Desktop.
Convert Atmel Studio auto Makefile to Unix based one
#!/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