ALT Linux Bugzilla
– Attachment 8001 Details for
Bug 36048
Добавить в пакет скрипт grub-entries
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
Теперь и с двойными, и с одинарными кавычками
grub-entries.sh (text/plain), 1.21 KB, created by
Leonid Krivoshein
on 2019-02-07 16:29:39 MSK
(
hide
)
Description:
Теперь и с двойными, и с одинарными кавычками
Filename:
MIME Type:
Creator:
Leonid Krivoshein
Created:
2019-02-07 16:29:39 MSK
Size:
1.21 KB
patch
obsolete
>#!/bin/sh -efu >### This file is covered by the GNU General Public License >### version 2 or later. >### >### Copyright (C) 2019 ALT Linux Team >### Author: Leonid Krivoshein <klark@altlinux.org> > >grubmenu="$(mktemp -q "${TMPDIR-/tmp}/grubmenu-XXXXXXXX.tmp")" > >sed \ > -re '/^\s*(menuentry\s+|submenu\s+|})/!d' \ > -re "s/^\s*menuentry\s+'([^']+)'.*\$/M \1/g" \ > -re 's/^\s*menuentry\s+"([^"]+)".*$/M \1/g' \ > -re "s/^\s*submenu\s+'([^']+)'.*\$/S \1/g" \ > -re 's/^\s*submenu\s+"([^"]+)".*$/S \1/g' \ > -re "s/^\s*}\s*\$/E -/g" > "$grubmenu" > ># Debug >#cat "$grubmenu" >#rm -f "$grubmenu" >#exit > >number= >prefix= >entry=0 >itemno=0 >while read mode title >do > case "$mode" in > M) echo "${number}${itemno} ${prefix}${title}" > itemno=$(($itemno + 1)) > entry=1 > ;; > S) number="${number}${itemno}>" > prefix="${prefix}${title}>" > itemno=0 > ;; > *) if [ $entry -ne 0 ]; then > entry=0 > elif [ -n "$number" ]; then > number="${number%>}" > prefix="${prefix%>}" > case "$number" in > *">"*) itemno="${number##*>}" > number="${number%>*}" > prefix="${prefix%>*}" > itemno=$(($itemno + 1)) > ;; > *) itemno=$number > itemno=$(($itemno + 1)) > prefix= > number= > ;; > esac > fi > ;; > esac >done < "$grubmenu" >rm -f "$grubmenu" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 36048
:
7989
|
7990
|
7996
|
7998
|
7999
|
8000
| 8001 |
8002
|
8003
|
8004
|
8007
|
8008
|
8009