summaryrefslogtreecommitdiff
path: root/src/grub-dev/get_title
diff options
context:
space:
mode:
Diffstat (limited to 'src/grub-dev/get_title')
-rw-r--r--src/grub-dev/get_title9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/grub-dev/get_title b/src/grub-dev/get_title
new file mode 100644
index 0000000..df8772b
--- /dev/null
+++ b/src/grub-dev/get_title
@@ -0,0 +1,9 @@
+get_title() {
+ FILE="$1"
+
+
+ pup -p -f "$FILE" 'title text{}' | \
+ tr -d \\n | \
+ sed 's/^GNU[^:]*: //' | \
+ sed 's/\"/\"\"/g'
+}