Created
November 29, 2013 21:14
-
-
Save AdamMagaluk/7712090 to your computer and use it in GitHub Desktop.
Little bash script to setup development of Jennic 5148 modules on Linux using Wine.
This file contains hidden or 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/bash | |
#Check if script is in Jennic Dir | |
if [ ! -d "Stack" ]; then | |
echo "Script does not appear to be ran in Jennic directory." | |
exit 2 | |
fi | |
# Check if wine is installed | |
command -v wine >/dev/null 2>&1 || { echo >&2 "Please install wine. Aborting."; exit 1; } | |
## Fix captital Config.mk files. | |
cp Stack/Common/Build/config.mk Stack/Common/Build/Config.mk | |
cp Stack/MAC/Build/config_MAC.mk Stack/MAC/Build/Config_MAC.mk | |
## Modify Common build config.mk to run all gcc tools from wine. | |
cp Chip/Common/Build/config.mk Chip/Common/Build/config.mk.prebackup | |
if [ ! -e "Chip/Common/Build/config.mk.backup" ]; then | |
echo "Backup Does not exist" | |
cat Chip/Common/Build/config.mk | sed 's/$(TOOL_BASE_DIR)\/$(TOOLCHAIN_PATH)\/bin\/$(CROSS_COMPILE)/wine $(TOOL_BASE_DIR)\/$(TOOLCHAIN_PATH)\/bin\/$(CROSS_COMPILE)/' > tmp.mk | |
mv tmp.mk Chip/Common/Build/config.mk | |
mv Chip/Common/Build/config.mk.prebackup Chip/Common/Build/config.mk.backup | |
fi | |
## Move cygin dll to wine sys32 | |
WINE_32_DIRECTORY="$HOME/.wine/drive_c/windows/system32/" | |
echo $WINE_32_DIRECTORY | |
if [ ! -d "$WINE_32_DIRECTORY" ]; then | |
echo "Wine's system32 folder does not exist." | |
exit 2 | |
fi | |
cp cygwin/bin/* $WINE_32_DIRECTORY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment