forked from msproul/AlpacaPi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_rules.sh
executable file
·40 lines (35 loc) · 1.06 KB
/
install_rules.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
###########################################################################
clear
echo "############################################"
echo "Installing rules files for"
echo " ZWO cameras"
echo " ZWO Filter wheels"
echo " Atik cameras"
echo "############################################"
###########################################################################
installRules()
{
RULE_DIR=$1
RULES_FILE=$2
if [ -f /lib/udev/rules.d/$RULES_FILE ]
then
echo "Rules file $RULES_FILE is already installed in /lib/udev"
elif [ -f /etc/udev/rules.d/$RULES_FILE ]
then
echo "Rules file $RULES_FILE is already installed in /etc/udev"
else
if [ -f $RULE_DIR/$RULES_FILE ]
then
echo "Installing $RULES_FILE"
sudo install $RULE_DIR/$RULES_FILE /lib/udev/rules.d
else
echo "Cant find $RULE_DIR/$RULES_FILE"
fi
fi
}
#asi.rules
installRules "ASI_lib/lib" "asi.rules"
installRules "EFW_linux_mac_SDK/lib" "efw.rules"
installRules "AtikCamerasSDK" "99-atik.rules"
installRules "toupcamsdk/linux/udev" "99-toupcam.rules"
installRules FLIR-SDK "40-flir-spinnaker.rules"