Skip to content

Commit

Permalink
Add quotes to make shellcheck happy
Browse files Browse the repository at this point in the history
  • Loading branch information
reachfh committed May 30, 2024
1 parent 706b484 commit c58eb04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion priv/templates/copy-files.eex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ APP_GROUP="${APP_GROUP:-"<%= app_group %>"}"

<%= for file <- copy_files, file[:enabled] != false do %>
cp -v <%= file.src %> "${DESTDIR}<%= file.dst %>"
<%= if file[:user] do %>chown <%= file.user %>:<%= file.group %> "${DESTDIR}<%= file.dst %>"<% end %>
<%= if file[:user] do %>chown "<%= file.user %>:<%= file.group %>" "${DESTDIR}<%= file.dst %>"<% end %>
<%= if file[:mode] do %>chmod <%= file.mode %> "${DESTDIR}<%= file.dst %>"<% end %>

<% end %>
2 changes: 1 addition & 1 deletion priv/templates/create-dirs.eex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ APP_GROUP="${APP_GROUP:-"<%= app_group %>"}"
<%= if dir[:comment] do %># <%= dir.comment %><% end %>
if [ ! -d "${DESTDIR}<%= dir.path %>" ]; then
mkdir -v -p "${DESTDIR}<%= dir.path %>"
<%= if dir[:user] do %>chown <%= dir.user %>:<%= dir.group %> "${DESTDIR}<%= dir.path %>"<% end %>
<%= if dir[:user] do %>chown "<%= dir.user %>:<%= dir.group %>" "${DESTDIR}<%= dir.path %>"<% end %>
<%= if dir[:mode] do %>chmod <%= dir.mode %> "${DESTDIR}<%= dir.path %>"<% end %>
fi
<% end %>
6 changes: 3 additions & 3 deletions priv/templates/stage-files.eex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo "==> Copying output files to ${OUTPUT_DIR}"
mkdir -p "${OUTPUT_DIR}"

if [ -f appspec.yml ]; then
cp -v appspec.yml ${OUTPUT_DIR}
cp -v appspec.yml "${OUTPUT_DIR}"
fi

<%= case release_system do %>
Expand All @@ -28,13 +28,13 @@ cp -v "_build/${MIX_ENV}/${RELEASE_NAME}-${RELEASE_VSN}.tar.gz" "${OUTPUT_DIR}/$
cp -v "_build/${MIX_ENV}/rel/${RELEASE_NAME}/releases/${RELEASE_VSN}/${RELEASE_NAME}.tar.gz" "${OUTPUT_DIR}/${RELEASE_NAME}.tar.gz"
<% end %>

mkdir -p ${OUTPUT_DIR}/systemd
mkdir -p "${OUTPUT_DIR}/systemd"
cp -v _build/${MIX_ENV}/systemd/lib/systemd/system/* "${OUTPUT_DIR}/systemd"

mkdir -p "${OUTPUT_DIR}/bin"
cp ${SCRIPTS_SRC}/* ${OUTPUT_DIR}/bin

mkdir -p ${OUTPUT_DIR}/etc
mkdir -p "${OUTPUT_DIR}/etc"

# mkdir -p "${OUTPUT_DIR}/static-assets"
# cp -R priv/static/* "${OUTPUT_DIR}/static-assets"
2 changes: 1 addition & 1 deletion priv/templates/sync-config-s3.eex
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ echo "Starting $0"

aws s3 sync --exact-timestamps --no-progress "s3://${CONFIG_S3_BUCKET}/${CONFIG_S3_PREFIX}" "${DESTDIR}${CONFIG_DIR}/"

chown -R $DEPLOY_USER:$APP_GROUP "${DESTDIR}$CONFIG_DIR"
chown -R "$DEPLOY_USER:$APP_GROUP" "${DESTDIR}$CONFIG_DIR"
find -H "${DESTDIR}$CONFIG_DIR" -type f -exec chmod 640 {} \;
find -H "${DESTDIR}$CONFIG_DIR" -type d -exec chmod 750 {} \;

0 comments on commit c58eb04

Please sign in to comment.