1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/HummingboardGPIO/fixup.sh
2014-12-10 09:29:18 +00:00

19 lines
633 B
Bash
Executable File

#!/bin/bash
echo "*********************************************"
echo "Moving gpiohb to /usr/local/bin/"
if [[ $EUID -ne 0 ]]; then
echo "Not running as user root" 2>&1
echo "please run the following commands manually"
echo " sudo cp $PWD/gpiohb /usr/local/bin/gpiohb"
echo " sudo chmod 4755 /usr/local/bin/gpiohb"
echo "or re-run npm install as root / sudo"
echo "*********************************************"
exit 1
else
cp gpiohb /usr/local/bin/
chmod 4755 /usr/local/bin/gpiohb
echo "OK - gpiohb moved to /usr/local/bin"
echo "*********************************************"
fi