Projects
Eulaceura:Mainline:GA
anaconda
_service:obs_scm:backport-Don-t-unnecessarily-u...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-Don-t-unnecessarily-use-cat-and-use-grep-E.patch of Package anaconda
From ab9b2f98134d99325ac468a7c01ed0e659464f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= <oguz@ersen.moe> Date: Sat, 26 Mar 2022 18:32:17 +0000 Subject: [PATCH] Don't unnecessarily use cat and use grep -E --- scripts/anaconda-pre-log-gen | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/anaconda-pre-log-gen b/scripts/anaconda-pre-log-gen index 30eacc8a3c..0012e076db 100755 --- a/scripts/anaconda-pre-log-gen +++ b/scripts/anaconda-pre-log-gen @@ -5,12 +5,8 @@ # where the resulting logs will be stored TARGET_DIRECTORY=/tmp/pre-anaconda-logs -BOOT_OPTIONS_FILE=/proc/cmdline - -DEBUG_ENABLED=`cat $BOOT_OPTIONS_FILE | egrep -c "\<debug\>|\<inst\.debug\>"` - # do not produce any logs unless debug is enabled -[ $DEBUG_ENABLED == '0' ] && exit 0 +grep -E -q "\<debug\>|\<inst\.debug\>" /proc/cmdline || exit 0 mkdir ${TARGET_DIRECTORY} -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2