]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add target to update the chromiumos rules
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Nov 2019 10:32:24 +0000 (11:32 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Nov 2019 10:36:59 +0000 (11:36 +0100)
There is no change in the file right now, but the download seems to work
OK.

It's funny that the biggest company in the world cannot provide a
download link in plain text.

hwdb.d/meson.build
meson.build
tools/chromiumos/gen_autosuspend_rules.py [changed mode: 0755->0644]
tools/meson-autosuspend-update.sh [new file with mode: 0755]

index 31ee3e74094fb8bd2d5aee0033fc0a80a347b169..1f73a8bbb69e13d9637888d762b749d8474a2f46 100644 (file)
@@ -47,3 +47,7 @@ endif
 run_target(
         'hwdb-update',
         command : [hwdb_update_sh, meson.current_source_dir()])
+
+run_target(
+        'autosuspend-update',
+        command : [autosuspend_update_sh, project_source_root + '/tools/chromiumos'])
index c27deffa8ee7e87e737673f0eaf0a179925dbdf1..fde351eba3a6b9963545e1626786828b3b09f491 100644 (file)
@@ -2930,6 +2930,7 @@ make_directive_index_py = find_program('tools/make-directive-index.py')
 make_man_index_py = find_program('tools/make-man-index.py')
 xml_helper_py = find_program('tools/xml_helper.py')
 hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
+autosuspend_update_sh = find_program('tools/meson-autosuspend-update.sh')
 
 subdir('sysctl.d')
 subdir('sysusers.d')
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/tools/meson-autosuspend-update.sh b/tools/meson-autosuspend-update.sh
new file mode 100755 (executable)
index 0000000..a4f99eb
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -eu
+
+cd "$1"
+
+(curl -L 'https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py?format=TEXT'; echo) \
+    | base64 -d > gen_autosuspend_rules.py