comment and change build location
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Mar 2021 10:34:16 +0000 (10:34 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Mar 2021 10:34:16 +0000 (10:34 +0000)
nextpnr-ecp5-install

index 8d8eddcea121c48d599ee72ba76fac214ce5fa2b..4d9220bd0e5932996335f7d3eba94836c3dfd5bc 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 if [ "$EUID" -ne 0 ]
-  then echo "Please run as root"
+  then echo "Please run as root using 'sudo bash'"
   exit
 fi
 
@@ -10,9 +10,10 @@ apt-get install -y python3 python3-dev clang cmake libboost-dev \
                     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
@@ -31,3 +32,4 @@ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nextpnr-ecp5 \
 make
 make install
 
+# TODO chown post-amble