npm architecture

This commit is contained in:
Bob Mottram 2017-09-14 12:28:14 +01:00
parent bee662a55d
commit 15b6762f79
1 changed files with 10 additions and 2 deletions

View File

@ -562,13 +562,21 @@ INSTALL_DIR=$HOME/build
INSTALLING_MESH= INSTALLING_MESH=
install_patchwork() { install_patchwork() {
NPM_ARCH='ia32'
if [[ $ARCHITECTURE == 'arm'* ]]; then
NPM_ARCH='armv7l'
fi
if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then
NPM_ARCH='x64'
fi
git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork
cat <<EOF > $rootdir/usr/bin/install_patchwork cat <<EOF > $rootdir/usr/bin/install_patchwork
#!/bin/bash #!/bin/bash
cd /etc/patchwork cd /etc/patchwork
npm install --arch=ia32 electron npm install --arch=$NPM_ARCH electron
npm install npm install --arch=$NPM_ARCH
EOF EOF
chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork
chroot "$rootdir" /usr/bin/install_patchwork chroot "$rootdir" /usr/bin/install_patchwork