Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/kindle-lightfix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/install.sh')
-rwxr-xr-xsrc/install.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/install.sh b/src/install.sh
new file mode 100755
index 0000000..f8eeab4
--- /dev/null
+++ b/src/install.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+##
+#
+# lightfix installer (c) Cluster aka Alexey Avyukgin
+# mailto: clusterrr@clusterrr.com
+#
+##
+
+# Pull some helper functions for logging
+source /etc/upstart/functions
+
+[ -f utils.tar.gz ] && {
+ tar xvf utils.tar.gz
+ rm -f utils.tar.gz
+}
+
+# Pull some helper functions for progress bar handling
+source consts/patchconsts
+source ui/blanket
+source ui/progressbar
+
+LOG_DOMAIN=lightfix
+SCALING=1
+FILECOUNT=2
+
+logmsg()
+{
+ f_log $1 ${LOG_DOMAIN} $2 "$3" "$4"
+}
+
+HACKNAME="${LOG_DOMAIN}"
+HACKVER="0.0.1"
+
+cat /etc/crontab/root | grep -v FrontLight > /etc/crontab/root
+update_percent_complete_scaled 1
+
+echo "* * * * * if [ \"\`cat /sys/devices/system/fl_tps6116x/fl_tps6116x0/fl_intensity | /bin/grep Light\`\" == \"FrontLight(Intensity) = 1\" ] ; then echo -n 0 > /sys/devices/system/fl_tps6116x/fl_tps6116x0/fl_intensity ; fi" >> /etc/crontab/root
+update_percent_complete_scaled 1
+
+logmsg "Lightfix installed"
+
+return 0