#!/bin/bash
if [ "$EUID" -ne 0 ]
- then echo "Please run as root"
+ then echo "Please run as root using 'sudo bash'"
exit
fi
libboost-program-options-dev libboost-iostreams-dev \
openocd libeigen3-dev
-cd /home
-mkdir nextpnr
-cd nextpnr
+# change into $SUDO_USER home directory
+cd /home/$SUDO_USER
+mkdir -p src/nextpnr
+cd src/nextpnr
git clone --recursive https://github.com/YosysHQ/prjtrellis
git clone --recursive https://github.com/YosysHQ/nextpnr
make
make install
+# TODO chown post-amble