mirror of
https://github.com/ShaYmez/ambed-debian-installer.git
synced 2024-11-21 23:45:14 -05:00
Fix Root detection and make it work on Raspbian.
works for renamed root accounts, corrected issues with the ftdi driver install on ARM
This commit is contained in:
parent
2aaf0920c6
commit
a0956c7c56
@ -11,8 +11,7 @@
|
|||||||
# systemctl start ambed #to start ambed
|
# systemctl start ambed #to start ambed
|
||||||
# ambed logs are part of /var/log/messages
|
# ambed logs are part of /var/log/messages
|
||||||
#Lets begin-------------------------------------------------------------------------------------------------
|
#Lets begin-------------------------------------------------------------------------------------------------
|
||||||
WHO=$(whoami)
|
if [ "$EUID" -ne 0 ];
|
||||||
if [ "$WHO" != "root" ];
|
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
echo "You Must be root to run this script!!"
|
echo "You Must be root to run this script!!"
|
||||||
@ -21,7 +20,7 @@ fi
|
|||||||
if [ ! -e "/etc/debian_version" ]
|
if [ ! -e "/etc/debian_version" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
echo "This script is only tested in Debian 8,9 and x64 cpu Arch. for now."
|
echo "This script is only tested in Debian 8,9,10. for now."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
DIRDIR=$(pwd)
|
DIRDIR=$(pwd)
|
||||||
@ -54,10 +53,10 @@ then
|
|||||||
cp libftd2xx.* /usr/local/lib
|
cp libftd2xx.* /usr/local/lib
|
||||||
chmod 0755 /usr/local/lib/libftd2xx.so.1.4.6
|
chmod 0755 /usr/local/lib/libftd2xx.so.1.4.6
|
||||||
ln -sf /usr/local/lib/libftd2xx.so.1.4.6 /usr/local/lib/libftd2xx.so
|
ln -sf /usr/local/lib/libftd2xx.so.1.4.6 /usr/local/lib/libftd2xx.so
|
||||||
elif [ "$ARC" = "armv71" ];
|
elif [ "$ARC" = "armv7l" ];
|
||||||
then
|
then
|
||||||
wget $ARM
|
wget $ARM
|
||||||
tar libftd2xx-arm-v7-hf-1.4.22.tgz
|
tar zxf libftd2xx-arm-v7-hf-1.4.22.tgz
|
||||||
cd release/build
|
cd release/build
|
||||||
cp libftd2xx.* /usr/local/lib
|
cp libftd2xx.* /usr/local/lib
|
||||||
chmod 0755 /usr/local/lib/libftd2xx.so.1.4.22
|
chmod 0755 /usr/local/lib/libftd2xx.so.1.4.22
|
||||||
|
Loading…
Reference in New Issue
Block a user