-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
41 lines (24 loc) · 790 Bytes
/
Copy pathinstall.sh
File metadata and controls
41 lines (24 loc) · 790 Bytes
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
40
41
#!/bin/sh
# Path for scripts executed on device events
SCRIPTS_LOG_PATH=/tmp/device
echo Creating directory to install device scripts in $SCRIPTS_LOG_PATH
if [ ! -e $SCRIPTS_LOG_PATH ]; then
mkdir $SCRIPTS_LOG_PATH
fi
echo Creating log file...
if [ ! -e $SCRIPTS_LOG_PATH/android-device-log.txt ]; then
touch $SCRIPTS_LOG_PATH/android-device-log.txt
fi
# Install scripts executed on device events
echo Installing device scripts...
cp logger/device_plug.sh $SCRIPTS_LOG_PATH
cp logger/device_unplug.sh $SCRIPTS_LOG_PATH
# Install udev rules
echo Installing udev rules...
cp ./udev/81-udev-notify.rules /etc/udev/rules.d/
# Restart udev
echo Restarting udev...
sh ./udev/udev-reload.sh
# For Fedora (uneeded)
# udev/fedora-udev-restart.sh
echo Installation finished.