Skip to content

Commit 17f81e9

Browse files
committed
script: Enable SC2001 rule for Gitian scripts
1 parent 61bb21b commit 17f81e9

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ script: |
144144
CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
145145
make dist
146146
SOURCEDIST=$(echo bitcoin-*.tar.gz)
147-
DISTNAME=$(echo ${SOURCEDIST} | sed 's/.tar.*//')
147+
DISTNAME=${SOURCEDIST/%.tar.gz}
148+
148149
# Correct tar file order
149150
mkdir -p temp
150151
pushd temp

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ script: |
107107
CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
108108
make dist
109109
SOURCEDIST=$(echo bitcoin-*.tar.gz)
110-
DISTNAME=$(echo ${SOURCEDIST} | sed 's/.tar.*//')
110+
DISTNAME=${SOURCEDIST/%.tar.gz}
111111
112112
# Correct tar file order
113113
mkdir -p temp

contrib/gitian-descriptors/gitian-win-signer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ script: |
3737
make
3838
find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
3939
INFILE="$(basename "${i}")"
40-
OUTFILE="$(echo "${INFILE}" | sed s/-unsigned//)"
40+
OUTFILE="${INFILE/%-unsigned}"
4141
./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
4242
done

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ script: |
114114
CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
115115
make dist
116116
SOURCEDIST=$(echo bitcoin-*.tar.gz)
117-
DISTNAME=$(echo ${SOURCEDIST} | sed 's/.tar.*//')
117+
DISTNAME=${SOURCEDIST/%.tar.gz}
118+
118119
# Correct tar file order
119120
mkdir -p temp
120121
pushd temp

test/lint/lint-shell.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ disabled=(
2323
SC2162 # read without -r will mangle backslashes.
2424
)
2525
disabled_gitian=(
26-
SC2001 # See if you can use ${variable//search/replace} instead.
2726
SC2094 # Make sure not to read and write the same file in the same pipeline.
2827
SC2129 # Consider using { cmd1; cmd2; } >> file instead of individual redirects.
2928
SC2230 # which is non-standard. Use builtin 'command -v' instead.

0 commit comments

Comments
 (0)