mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Fix sed binary call with variable (#1707)
* Use variable instead of binary name * Use variable for sed
This commit is contained in:
parent
858d6c030c
commit
0b72ff2a74
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
||||
###
|
||||
|
|
Loading…
Reference in a new issue