-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·39 lines (32 loc) · 738 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·39 lines (32 loc) · 738 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
#!/bin/sh -i
INSTALL_DIR=/usr/local/bin
RULES_DIR=/etc/udev/rules.d
script_dir=$(readlink -f $(dirname $0))
echo "Copying backlight udev rules to $RULES_DIR"
cp -i $script_dir/backlight.rules -t $RULES_DIR
cp_br=$?
if [ $cp_br -eq 0 ]
then
echo
echo "Overwritten backlight udev rules to $RULES_DIR"
fi
echo
echo "Copying intel-backlight binary to $INSTALL_DIR"
cp -i $script_dir/intel-backlight.sh $INSTALL_DIR/intel-backlight
cp_ib=$?
if [ $cp_ib -eq 0 ]
then
echo
echo "Overwritten intel-backlight to $INSTALL_DIR"
fi
if [ $cp_br -eq 0 ] && [ $cp_ib -eq 0 ]
then
echo
echo "Installed intel-backlight."
fi
if [ $cp_br -ne 0 ] && [ $cp_ib -ne 0 ]
then
echo
echo "intel-backlight already installed."
fi
exit 0