Skip to content

Commit de552f9

Browse files
committed
refactor: format bash scripts
1 parent a8e6067 commit de552f9

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

scripts/build-artifacts.bash

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ tar czf "$PKG_VERSION".tar.gz -C out .
2828

2929
# Get release body
3030
delta=$(echo "$NEW_COMMIT_N - $OLD_COMMIT_N" | bc)
31-
echo -en "# Commits since last release\n\n" > body.md
32-
echo -en "Check [upstream]($UPSTREAM_REPO/commits) for the full history.\n\n" >> body.md
31+
echo -en "# Commits since last release\n\n" >body.md
32+
echo -en "Check [upstream]($UPSTREAM_REPO/commits) for the full history.\n\n" >>body.md
3333

3434
# Get the list of commits since last release
35-
curl -s "$UPSTREAM_API"/commits?per_page="$delta" | \
35+
curl -s "$UPSTREAM_API"/commits?per_page="$delta" |
3636
# Parse and retain only the commit message + its url
37-
jq -r '.[] | (.commit.message | capture("(?<id>.+)\n").id) + " [commit](" + .html_url + ")"' | \
37+
jq -r '.[] | (.commit.message | capture("(?<id>.+)\n").id) + " [commit](" + .html_url + ")"' |
3838
# Remove "Merge" commits
39-
sed '/^Merge/,+1 d' | \
39+
sed '/^Merge/,+1 d' |
4040
# Remove any special char at the beginning of the message
41-
sed 's/^[^[:alnum:]]*//' | \
41+
sed 's/^[^[:alnum:]]*//' |
4242
# Prepend "- " to the message
43-
sed -r 's/(.*)/- \1/' >> body.md
43+
sed -r 's/(.*)/- \1/' >>body.md

scripts/docker-build.bash

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
source assets/variables
55

66
DOCKER_BUILDKIT=1 docker build \
7-
--build-arg UPSTREAM_BRANCH="$UPSTREAM_BRANCH" \
8-
--build-arg UPSTREAM_REPO="$UPSTREAM_REPO" \
9-
--build-arg USR="$USR" \
10-
--build-arg USR_HOME="$USR_HOME" \
11-
--progress plain \
12-
.
7+
--build-arg UPSTREAM_BRANCH="$UPSTREAM_BRANCH" \
8+
--build-arg UPSTREAM_REPO="$UPSTREAM_REPO" \
9+
--build-arg USR="$USR" \
10+
--build-arg USR_HOME="$USR_HOME" \
11+
--progress plain \
12+
.

scripts/push-to-aur.bash

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ sum=$(sha512sum "$PKG_VERSION".tar.gz | sed -r 's/(.*)\s\s.*/\1/')
1111
# Setup SSH
1212
cd /root
1313
mkdir .ssh
14-
echo "$PUB_KEY" | tr -d '\r' > .ssh/id_aur.pub
15-
echo "$PRIV_KEY" | base64 --decode > .ssh/id_aur
14+
echo "$PUB_KEY" | tr -d '\r' >.ssh/id_aur.pub
15+
echo "$PRIV_KEY" | base64 --decode >.ssh/id_aur
1616
chmod 600 .ssh/id_aur
17-
echo -en 'Host '"$AUR_DNS"'\n IdentityFile /root/.ssh/id_aur\n User aur\n' > .ssh/config
18-
ssh-keyscan "$AUR_DNS" > .ssh/known_hosts
19-
ssh-keyscan "$AUR_IP" >> .ssh/known_hosts
17+
echo -en 'Host '"$AUR_DNS"'\n IdentityFile /root/.ssh/id_aur\n User aur\n' >.ssh/config
18+
ssh-keyscan "$AUR_DNS" >.ssh/known_hosts
19+
ssh-keyscan "$AUR_IP" >>.ssh/known_hosts
2020

2121
# Setup git
2222
alias mygit="git -c user.name=Méril\ Pilon -c user.email=me@mpsq.org"
@@ -32,7 +32,7 @@ sed -i -r -e 's~pkgrel=.*~pkgrel='"$PKG_REL"'~' PKGBUILD
3232

3333
# Cleanup + fix permissions
3434
rm .SRCINFO
35-
su "$USR" -c "makepkg --printsrcinfo" > .SRCINFO
35+
su "$USR" -c "makepkg --printsrcinfo" >.SRCINFO
3636
chown -R "$USR":"$USR" .SRCINFO
3737

3838
# Push changes

scripts/set-env-vars.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -euxo pipefail
44

55
# We set PKG_VERSION to "xx.xx.xx"
66
PKG_VERSION=$(
7-
curl -s "$UPSTREAM_SRC"/configure.ac | \
8-
grep AC_INIT | \
7+
curl -s "$UPSTREAM_SRC"/configure.ac |
8+
grep AC_INIT |
99
sed -e 's/^.\+\ \([0-9]\+\.[0-9]\+\.[0-9]\+\?\).\+$/\1/'
1010
)
1111
PKG_VERSION+="."

0 commit comments

Comments
 (0)