summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-04-26 13:52:01 +0200
committerlonkaars <loek@pipeframe.xyz>2022-04-26 13:52:01 +0200
commit1f45e0a5aaaf0aec106876fec1cfe4895460b86e (patch)
tree198f591f8416e1b62f5498501cce1be7678dc69a /scripts
parentd067eacc112f2453e95f0dde89bb0f60f170a195 (diff)
project bootstrap script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.ps17
-rw-r--r--scripts/install-mingw-packages.sh2
-rwxr-xr-xscripts/install-sdk.sh28
3 files changed, 26 insertions, 11 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
new file mode 100644
index 0000000..9b8b4c0
--- /dev/null
+++ b/scripts/bootstrap.ps1
@@ -0,0 +1,7 @@
+Start-BitsTransfer -Source https://github.com/msys2/msys2-installer/releases/download/2022-03-19/msys2-x86_64-20220319.exe -Destination .\msys2-x86_64-latest.exe
+.\msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys64
+Remove-Item .\msys2-x86_64-latest.exe
+C:/msys64/usr/bin/sh.exe -c 'curl -s https://raw.githubusercontent.com/lonkaars/wall-e2/master/scripts/install-mingw-packages.sh | sh'
+C:/msys64/usr/bin/sh.exe -c 'git clone https://github.com/lonkaars/wall-e2'
+C:/msys64/usr/bin/sh.exe -c '~/wall-e2/scripts/install-sdk.sh'
+C:/msys64/usr/bin/sh.exe -c 'cd ~/wall-e2 && explorer.exe .'
diff --git a/scripts/install-mingw-packages.sh b/scripts/install-mingw-packages.sh
new file mode 100644
index 0000000..c847e4e
--- /dev/null
+++ b/scripts/install-mingw-packages.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+pacman --noconfirm -Sy make git unzip mingw-w64-x86_64-avr-toolchain mingw-w64-x86_64-toolchain mingw-w64-clang-x86_64-clang mingw-w64-x86_64-avrdude
diff --git a/scripts/install-sdk.sh b/scripts/install-sdk.sh
index 56243c8..4773186 100755
--- a/scripts/install-sdk.sh
+++ b/scripts/install-sdk.sh
@@ -1,32 +1,38 @@
#!/bin/sh
+OS=`uname -o`
+LINUX="GNU/Linux"
+WINDOWS="Msys"
+
bye () {
echo "run me as root!"
exit 1
}
-[ $(id -g) -ne 0 ] && bye
+[ "$OS" != "$WINDOWS" ] && [ $(id -g) -ne 0 ] && bye
mkdir temp
cd temp
wget https://www.pololu.com/file/0J1058/libpololu-avr-151002.zip -O libpololu-avr.zip
-wget https://www.pololu.com/file/0J490/wixel-linux-110623-amd64.tar.gz -O wixel-linux.tar.gz
-
unzip libpololu-avr.zip
-tar -xvzf wixel-linux.tar.gz
-
-rm libpololu-avr.zip wixel-linux.tar.gz
+rm libpololu-avr.zip
cd libpololu-avr
make install
cd ..
-cd wixel_linux
-mv wixelconfig /usr/bin/wixelconfig
-mv wixelcmd /usr/bin/wixelcmd
-mv 99-pololu.rules /etc/udev/rules.d/99-pololu.rules
-cd ..
+if [ "$OS" = "$LINUX" ]; then
+ wget https://www.pololu.com/file/0J490/wixel-linux-110623-amd64.tar.gz -O wixel-linux.tar.gz
+ tar -xvzf wixel-linux.tar.gz
+ rm wixel-linux.tar.gz
+
+ cd wixel_linux
+ mv wixelconfig /usr/bin/wixelconfig
+ mv wixelcmd /usr/bin/wixelcmd
+ mv 99-pololu.rules /etc/udev/rules.d/99-pololu.rules
+ cd ..
+fi
cd ..
rm -rf temp