-
Notifications
You must be signed in to change notification settings - Fork 5
/
install_udev_rules.sh
executable file
·30 lines (24 loc) · 1.25 KB
/
install_udev_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
#!/bin/bash
#"***************************************************************************************************"
# common initialization
#"***************************************************************************************************"
#
# perform some version control checks on this file
./gitcheck.sh $0
# initialize some environment variables and perform some sanity checks
. ./init.sh
# we don't want tee to capture exit codes
set -o pipefail
#"***************************************************************************************************"
# Install udev rules
#"***************************************************************************************************"
# see https://github.com/emard/ulx3s-bin
if [ -f "/etc/udev/rules.d/80-fpga-ulx3s.rules" ]; then
echo "Found /etc/udev/rules.d/80-fpga-ulx3s.rules ... skipping copy." 2>&1 | tee -a "$THIS_LOG"
else
echo "Copy /etc/udev/rules.d/80-fpga-ulx3s.rules" 2>&1 | tee -a "$THIS_LOG"
sudo cp 80-fpga-ulx3s.rules /etc/udev/rules.d/80-fpga-ulx3s.rules 2>&1 | tee -a "$THIS_LOG"
$SAVED_CURRENT_PATH/check_for_error.sh $? "$THIS_LOG"
fi
echo "Completed $0 " | tee -a "$THIS_LOG"
echo "----------------------------------"