Skip to content

Commit

Permalink
improve prebuilt modules generation
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Feb 17, 2019
1 parent e879286 commit 8836837
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
22 changes: 22 additions & 0 deletions prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

DEST="prebuilt/armv6l"
REMOTE="root@pi-black"
REMOTE_PATH="/root/redmatic-prebuild"

cat addon_files/redmatic/lib/package.json | jq 'del(.dependencies.npm,.dependencies."node-red")' > $DEST/package.json

scp $DEST/package.json $REMOTE:$REMOTE_PATH

#ssh -t $REMOTE "cd $REMOTE_PATH ; npm install --global-style"

rm -r ${DEST}/lib/node_modules

files=`ssh -t $REMOTE "cd $REMOTE_PATH ; find ./ -type f -name \*.node |grep -v obj.target"`

while read -r binary; do
from=`echo ${REMOTE}:${REMOTE_PATH}/${binary} | tr -d '\r'`
dest=`echo ${DEST}/lib/${binary%/*} | tr -d '\r'`
mkdir -p ${dest}
scp -q ${from} ${dest} && echo "${binary}"
done <<< "$files"
16 changes: 0 additions & 16 deletions prebuilt.sh

This file was deleted.

Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 8836837

Please sign in to comment.