summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornomoo <nomoo@nomoo.ru>2022-09-13 23:41:41 +0300
committerGitHub <noreply@github.com>2022-09-13 22:41:41 +0200
commit0b72ff2a74da242f39697f2a51f5c3f4544c0268 (patch)
treee6a7ad1dd4f1f72308ee22d1382f66caab540017
parent858d6c030c69dde568f0708dded8083385c17144 (diff)
Fix sed binary call with variable (#1707)
* Use variable instead of binary name * Use variable for sed
-rwxr-xr-xscript/get_git_rev.sh5
-rwxr-xr-xscript/rofi-theme-selector2
2 files changed, 4 insertions, 3 deletions
diff --git a/script/get_git_rev.sh b/script/get_git_rev.sh
index 1b6ac077..61813b1c 100755
--- a/script/get_git_rev.sh
+++ b/script/get_git_rev.sh
@@ -3,12 +3,13 @@
DIR=$1
FILE=$2
GIT=$(which git)
+SED=$(which sed)
if [ -d "${DIR}/.git/" ] && [ -n "${GIT}" ]
then
echo -n "#define GIT_VERSION \"" > "${FILE}.tmp"
- BRTG="$(${GIT} describe --tags --always --all | sed -e 's:heads/::')"
- REV="$(${GIT} describe --tags --always --dirty| sed -e 's:-g\([a-f0-9]\{7\}\):-git-\1:g')"
+ BRTG="$(${GIT} describe --tags --always --all | ${SED} -e 's:heads/::')"
+ REV="$(${GIT} describe --tags --always --dirty| ${SED} -e 's:-g\([a-f0-9]\{7\}\):-git-\1:g')"
echo -n "${REV} (${BRTG})" >> "${FILE}.tmp"
echo "\"" >> "${FILE}.tmp"
else
diff --git a/script/rofi-theme-selector b/script/rofi-theme-selector
index a7431fb9..e0cb8581 100755
--- a/script/rofi-theme-selector
+++ b/script/rofi-theme-selector
@@ -103,7 +103,7 @@ create_config_copy()
{
${ROFI} -dump-config > "${TMP_CONFIG_FILE}"
# remove theme entry.
- sed -i 's/^\s*theme:\s\+".*"\s*;//g' "${TMP_CONFIG_FILE}"
+ ${SED} -i 's/^\s*theme:\s\+".*"\s*;//g' "${TMP_CONFIG_FILE}"
}
###