Skip to content

Commit 30e8cbf

Browse files
[core] remove unneeded vars from shellcheck (#3899)
* remove unneeded wars * Update alpine-wireguard-install.sh --------- Co-authored-by: Tobias <[email protected]>
1 parent d557d01 commit 30e8cbf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+300
-306
lines changed

ct/alpine-wireguard.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function update_script() {
3131

3232
if [[ -d /etc/wgdashboard/src ]]; then
3333
msg_info "update WGDashboard"
34-
cd /etc/wgdashboard/src || exit
34+
cd /etc/wgdashboard/src
3535
$STD echo "y" | ./wgd.sh update
3636
$STD ./wgd.sh start
3737
msg_ok "WGDashboard updated"

ct/bookstack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function update_script() {
4242
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ || true
4343
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true
4444
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ || true
45-
cd /opt/bookstack || exit
45+
cd /opt/bookstack
4646
export COMPOSER_ALLOW_SUPERUSER=1
4747
$STD composer install --no-dev
4848
$STD php artisan migrate --force

ct/create_lxc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ if qm status "$CTID" &>/dev/null || pct status "$CTID" &>/dev/null; then
200200
fi
201201

202202
# Get template storage
203-
TEMPLATE_STORAGE=$(select_storage template) || exit
203+
TEMPLATE_STORAGE=$(select_storage template)
204204
msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
205205

206206
# Get container storage
207-
CONTAINER_STORAGE=$(select_storage container) || exit
207+
CONTAINER_STORAGE=$(select_storage container)
208208
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
209209

210210
# Update LXC template list
@@ -279,4 +279,4 @@ if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[
279279
exit 209
280280
fi
281281
fi
282-
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."
282+
msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created."

ct/fenrus.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function update_script() {
3232
msg_info "Updating ${APP}"
3333
systemctl stop ${APP}
3434
git clone https://github.com/revenz/Fenrus.git
35-
cd Fenrus || exit
35+
cd Fenrus
3636
gitVersionNumber=$(git rev-parse HEAD)
3737

3838
if [[ "${gitVersionNumber}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
@@ -66,4 +66,4 @@ description
6666
msg_ok "Completed Successfully!\n"
6767
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
6868
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
69-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
69+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"

ct/gomft.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function update_script() {
5050
curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
5151
tar -xzf "$temp_file"
5252
cp -rf "GoMFT-${RELEASE}"/* /opt/gomft/
53-
cd /opt/gomft || exit
53+
cd /opt/gomft
5454
rm -rf /opt/gomft/node_modules
5555
$STD npm ci
5656
$STD node build.js

ct/heimdall-dashboard.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ function update_script() {
4343
tar xzf "${RELEASE}".tar.gz
4444
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
4545
cp -R Heimdall-"${VER}"/* /opt/Heimdall
46-
cd /opt/Heimdall || exit
46+
cd /opt/Heimdall
4747
$STD apt-get install -y composer
4848
export COMPOSER_ALLOW_SUPERUSER=1
4949
$STD composer dump-autoload
5050
echo "${RELEASE}" >/opt/${APP}_version.txt
5151
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
5252
msg_info "Restoring Data"
53-
cd ~ || exit
53+
cd ~
5454
cp -R database-backup/* /opt/Heimdall/database
5555
cp -R public-backup/* /opt/Heimdall/public
5656
sleep 1

ct/hoarder.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function update_script() {
4040
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
4141
$STD apt-get install -y graphicsmagick ghostscript
4242
fi
43-
cd /opt || exit
43+
cd /opt
4444
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
4545
mkdir -p /etc/hoarder
4646
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
@@ -49,14 +49,14 @@ function update_script() {
4949
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
5050
unzip -q v"${RELEASE}".zip
5151
mv karakeep-"${RELEASE}" /opt/hoarder
52-
cd /opt/hoarder/apps/web || exit
52+
cd /opt/hoarder/apps/web
5353
$STD pnpm install --frozen-lockfile
5454
$STD pnpm exec next build --experimental-build-mode compile
5555
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
56-
cd /opt/hoarder/apps/workers || exit
56+
cd /opt/hoarder/apps/workers
5757
$STD pnpm install --frozen-lockfile
5858
export DATA_DIR=/opt/hoarder_data
59-
cd /opt/hoarder/packages/db || exit
59+
cd /opt/hoarder/packages/db
6060
$STD pnpm migrate
6161
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
6262
msg_ok "Updated ${APP} to v${RELEASE}"

ct/karakeep.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function update_script() {
4040
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
4141
$STD apt-get install -y graphicsmagick ghostscript
4242
fi
43-
cd /opt || exit
43+
cd /opt
4444
if [[ -f /opt/karakeep/.env ]] && [[ ! -f /etc/karakeep/karakeep.env ]]; then
4545
mkdir -p /etc/karakeep
4646
mv /opt/karakeep/.env /etc/karakeep/karakeep.env
@@ -49,14 +49,14 @@ function update_script() {
4949
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
5050
unzip -q "v${RELEASE}.zip"
5151
mv karakeep-"${RELEASE}" /opt/karakeep
52-
cd /opt/karakeep/apps/web || exit
52+
cd /opt/karakeep/apps/web
5353
$STD pnpm install --frozen-lockfile
5454
$STD pnpm exec next build --experimental-build-mode compile
5555
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
56-
cd /opt/karakeep/apps/workers || exit
56+
cd /opt/karakeep/apps/workers
5757
$STD pnpm install --frozen-lockfile
5858
export DATA_DIR=/opt/karakeep_data
59-
cd /opt/karakeep/packages/db || exit
59+
cd /opt/karakeep/packages/db
6060
$STD pnpm migrate
6161
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/karakeep/karakeep.env
6262
msg_ok "Updated ${APP} to v${RELEASE}"

ct/kimai.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function update_script() {
6666
[ -f "$BACKUP_DIR/.env" ] && cp "$BACKUP_DIR/.env" /opt/kimai/
6767
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
6868
rm -rf "$BACKUP_DIR"
69-
cd /opt/kimai || exit
69+
cd /opt/kimai
7070
$STD composer install --no-dev --optimize-autoloader
7171
$STD bin/console kimai:update
7272
echo "${RELEASE}" >/opt/${APP}_version.txt

ct/nginxproxymanager.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function update_script() {
5252

5353
msg_info "Downloading NPM v${RELEASE}"
5454
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
55-
cd nginx-proxy-manager-"${RELEASE}" || exit
55+
cd nginx-proxy-manager-"${RELEASE}"
5656
msg_ok "Downloaded NPM v${RELEASE}"
5757

5858
msg_info "Setting up Enviroment"
@@ -103,7 +103,7 @@ function update_script() {
103103
msg_ok "Setup Enviroment"
104104

105105
msg_info "Building Frontend"
106-
cd ./frontend || exit
106+
cd ./frontend
107107
$STD pnpm install
108108
$STD pnpm upgrade
109109
$STD pnpm run build
@@ -128,7 +128,7 @@ function update_script() {
128128
}
129129
EOF
130130
fi
131-
cd /app || exit
131+
cd /app
132132
$STD pnpm install
133133
msg_ok "Initialized Backend"
134134

0 commit comments

Comments
 (0)