Skip to content

Commit 810e7f8

Browse files
authored
Merge pull request #326 from alerque/avoid-bashishm-in-configure
Remove bashism from configure script
2 parents 9f30385 + 53855f1 commit 810e7f8

File tree

7 files changed

+24
-20
lines changed

7 files changed

+24
-20
lines changed

.github/workflows/build.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
1414
- name: Fetch tags
@@ -21,7 +21,7 @@ jobs:
2121
make DESTDIR=. install-exec
2222
echo VERSION=$(cat .version) >> $GITHUB_ENV
2323
- name: Post standalone script artifact
24-
uses: actions/upload-artifact@v2
24+
uses: actions/upload-artifact@v3
2525
with:
2626
name: standalone-deployment-${{ env.VERSION }}
2727
path: vcsh-standalone.sh
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v2
33+
uses: actions/checkout@v3
3434
with:
3535
fetch-depth: 0
3636
- name: Fetch tags
@@ -40,7 +40,7 @@ jobs:
4040
run: |
4141
sudo apt install -y ronn
4242
- name: Install perl test dependencies
43-
uses: perl-actions/install-with-cpanm@v1.1
43+
uses: perl-actions/install-with-cpanm@v1.4
4444
with:
4545
install: |
4646
Shell::Command
@@ -57,7 +57,7 @@ jobs:
5757
make dist
5858
echo VERSION=$(cat .version) >> $GITHUB_ENV
5959
- name: Post build artifacts
60-
uses: actions/upload-artifact@v2
60+
uses: actions/upload-artifact@v3
6161
with:
6262
name: vcsh-${{ env.VERSION }}
6363
path: vcsh-${{ env.VERSION }}.zip

.github/workflows/lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
- name: Lint code style
1313
uses: editorconfig-checker/[email protected]
1414

1515
shellcheck:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020
- name: Configure
2121
run: |
2222
./bootstrap.sh
2323
./configure --without-man-page --disable-tests
2424
- name: Run shellcheck
25-
uses: reviewdog/action-shellcheck@v1.0.0
25+
uses: reviewdog/action-shellcheck@v1.15.0
2626
with:
2727
pattern: vcsh
2828
reporter: github-pr-review

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818
- name: Install build dependencies
1919
run: |
2020
sudo apt install -y ronn
@@ -49,15 +49,15 @@ jobs:
4949
needs: [ ghrelease ]
5050
steps:
5151
- name: Checkout
52-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
5353
- name: Configure standalone script
5454
run: |
5555
echo "${GITHUB_REF#refs/*/v}" > .tarball-version
5656
./bootstrap.sh
5757
./configure --with-standalone --bindir=/
5858
make DESTDIR=. install-exec
5959
- name: Add standalone deployment to release
60-
uses: svenstaro/upload-release-action@v2
60+
uses: svenstaro/upload-release-action@v3
6161
with:
6262
repo_token: ${{ github.token }}
6363
file: vcsh-standalone.sh

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
1414
- name: Fetch tags
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
sudo apt install -y ronn
2020
- name: Install perl test dependencies
21-
uses: perl-actions/install-with-cpanm@v1.1
21+
uses: perl-actions/install-with-cpanm@v1.4
2222
with:
2323
install: |
2424
Shell::Command

build-aux/ax_progvar.m4

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AC_DEFUN([AX_PROGVAR], [
2+
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
3+
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
4+
])
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AC_DEFUN([AX_SUBST_TRANSFORMED_PACKAGE_NAME], [
2+
AC_PROG_SED
3+
TRANSFORMED_PACKAGE_NAME="$(printf "$PACKAGE_NAME" | $SED -e "$(printf "$program_transform_name" | $SED -e 's/\$\$/\$/')")"
4+
AC_SUBST([TRANSFORMED_PACKAGE_NAME])
5+
])

configure.ac

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ AC_CONFIG_MACRO_DIR([build-aux])
88
AM_CONDITIONAL([IS_SDIST],
99
[test ! -e .gitignore])
1010

11-
AC_DEFUN([AX_PROGVAR], [
12-
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
13-
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
14-
])
15-
1611
AC_ARG_WITH([standalone],
1712
AS_HELP_STRING([--with-standalone],
1813
[Use configuration presets for a standalone script deployment @<:@default=no@:>@]),
@@ -105,8 +100,7 @@ AM_COND_IF([ENABLE_ZSH_COMPLETION],
105100
[ZSH_COMPLETION_DIR="$with_zsh_completion_dir"])
106101
AC_SUBST([ZSH_COMPLETION_DIR])
107102

108-
TRANSFORMED_PACKAGE_NAME="$(printf "$PACKAGE_NAME" | $SED -e "${program_transform_name//\$\$/\$}")"
109-
AC_SUBST([TRANSFORMED_PACKAGE_NAME])
103+
AX_SUBST_TRANSFORMED_PACKAGE_NAME
110104

111105
AC_CONFIG_FILES([Makefile])
112106
AC_CONFIG_FILES([vcsh], [chmod +x vcsh])

0 commit comments

Comments
 (0)