From d120eb82a96c0489aba35556e76ae4d6c3ebc7e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de>
Date: Fri, 14 Oct 2022 17:02:45 +0200
Subject: [PATCH] refactor: summarize 3 LoC into 1 in get_mimetype()

---
 validate_workflow.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/validate_workflow.sh b/validate_workflow.sh
index 60e4f14..c7fb3f1 100755
--- a/validate_workflow.sh
+++ b/validate_workflow.sh
@@ -164,9 +164,7 @@ error() {
 
 get_mimetype() {
     local filename=$1
-    local res
-    res=$(file --mime-type "$filename" |  sed -e "s/^.*: //")
-    echo "$res"
+    echo "$( file --mime-type "$filename" |  sed -e "s/^.*: //" )"
 }
 
 
-- 
GitLab