Skip to content

Commit

Permalink
prevent script from hanging
Browse files Browse the repository at this point in the history
  • Loading branch information
CtrlZmaster committed Nov 11, 2024
1 parent 1261564 commit e5eec11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/app/.bin/build/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ app_dir_init() {
rm -rf "${_app_dir:?}/"*

# Copy src "template" dir
cp -r "${template_dir:?}/"* "$_app_dir"
cp -rf "${template_dir:?}/"* "$_app_dir"
# Dirs/files copied from src_dir (i.e. template_dir) can be readonly (e.g.
# when `make distcheck`).
chmod --recursive ug+w "$_app_dir"

# Copy compiled assets
cp -r "${webpack_output_dir:?}/"* "$_app_dir"
cp -rf "${webpack_output_dir:?}/"* "$_app_dir"
}

app_link() {
Expand Down Expand Up @@ -166,8 +166,8 @@ app_link() {
# ------------------------------------------------------------------------------
standalone_dir="$output_dir"/for-standalone
app_dir_init "$standalone_dir"
rm "$standalone_dir"/"$template_adapter_cockpit"
rm "$standalone_dir"/"$template_manifest_cockpit"
rm -f "$standalone_dir"/"$template_adapter_cockpit"
rm -f "$standalone_dir"/"$template_manifest_cockpit"
app_link "$standalone_dir" "/ui"
echo "Build prepared: ${standalone_dir}."

Expand All @@ -181,10 +181,10 @@ sed --in-place \
sed --in-place \
"s#^var pcsdSocket = \".*\";#var pcsdSocket = \"$pcsd_unix_socket\";#" \
"$cockpit_dir"/"$template_adapter_cockpit"
mv \
mv -f \
"$cockpit_dir"/"$template_adapter_cockpit" \
"$cockpit_dir"/"$template_adapter"
mv \
mv -f \
"$cockpit_dir"/"$template_manifest_cockpit" \
"$cockpit_dir"/"$template_manifest"
app_link "$cockpit_dir" "."
Expand Down

0 comments on commit e5eec11

Please sign in to comment.