Skip to content

Commit b64e13c

Browse files
committed
Support space in folder names for build scripts
1 parent b54b98c commit b64e13c

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/MacVim/MacVim.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@
10531053
);
10541054
runOnlyForDeploymentPostprocessing = 0;
10551055
shellPath = /bin/sh;
1056-
shellScript = "./scripts/cleanup-after-build $BUILT_PRODUCTS_DIR/$WRAPPER_NAME\n";
1056+
shellScript = "./scripts/cleanup-after-build \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME\"\n";
10571057
showEnvVarsInLog = 0;
10581058
};
10591059
90BD4EF224E0E8B700BF29F2 /* Copy locale message translation files */ = {

src/MacVim/scripts/cleanup-after-build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ macvim_path=$1
1313

1414
sparkle_xpcservices="$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/Current/XPCServices"
1515

16-
if [ -d $sparkle_xpcservices ]; then
16+
if [ -d "$sparkle_xpcservices" ]; then
1717
# This only happens when building using Sparkle 2. It contains XPC Services
1818
# files which are only necessary for sandboxed apps, and not recommended
1919
# otherwise. See https://sparkle-project.org/documentation/sandboxing/.
2020
set -x
21-
rm -rf $sparkle_xpcservices
21+
rm -rf "$sparkle_xpcservices"
2222
fi

src/MacVim/scripts/notarize-dmg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
set -e
1313

14-
macvim_dmg=$1
14+
macvim_dmg="$1"
1515

1616
# Xcode 13 changed the workflow to use "notarytool" instead of "altool". Use that by default.
1717

@@ -31,7 +31,7 @@ if [[ "$USE_ALTOOL" != "1" ]]; then
3131
fi
3232

3333
# Step 1.1: Submit app for notarization, and wait till it finishes.
34-
notarize_submit_results=$(set -x; xcrun notarytool submit ${macvim_dmg} --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}")
34+
notarize_submit_results=$(set -x; xcrun notarytool submit "${macvim_dmg}" --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}")
3535

3636
echo $notarize_submit_results
3737
notarize_submit_uuid=$(echo $notarize_submit_results | grep "id:" | head -1 | sed -E "s/^.*id:[ ]*(.*)/\1/")
@@ -73,7 +73,7 @@ else
7373

7474
# Step 1.1: Submit app to Apple's servers for notarization
7575
set -x
76-
notarize_submit_uuid=$(xcrun altool --notarize-app --primary-bundle-id "org.vim.macvim" --file ${macvim_dmg} --username "${ALTOOL_USERNAME}" --password "${ALTOOL_PASSWORD}" | grep "RequestUUID" | sed -E "s/RequestUUID = (.*)/\1/")
76+
notarize_submit_uuid=$(xcrun altool --notarize-app --primary-bundle-id "org.vim.macvim" --file "${macvim_dmg}" --username "${ALTOOL_USERNAME}" --password "${ALTOOL_PASSWORD}" | grep "RequestUUID" | sed -E "s/RequestUUID = (.*)/\1/")
7777
set +x
7878

7979
if [[ ${notarize_submit_uuid} == "" ]]; then
@@ -117,10 +117,10 @@ fi
117117

118118
# Step 2: Staple the notarization info to the DMG so that an offline user can
119119
# verify that it is notarized.
120-
(set -x; xcrun stapler staple ${macvim_dmg})
120+
(set -x; xcrun stapler staple "${macvim_dmg}")
121121

122122
# Just print out extra info for reference
123123
echo "--------------------"
124124
set -x
125-
codesign -d --verbose=2 ${macvim_dmg}
126-
spctl -a -t open --context context:primary-signature -v ${macvim_dmg}
125+
codesign -d --verbose=2 "${macvim_dmg}"
126+
spctl -a -t open --context context:primary-signature -v "${macvim_dmg}"

src/MacVim/scripts/sign-developer-id

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@ set -e
1717
macvim_path=$1
1818
entitlements=$2
1919

20-
if [[ $macvim_path =~ dmg ]]; then
20+
if [[ "$macvim_path" =~ dmg ]]; then
2121
set -x
22-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path
22+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path"
2323
else
2424
# Sign bottom-up to make sure everything is signed in order.
2525
# Note: Not using --deep because it's been deprecated since macOS 13, and
2626
# also it doesn't catch all the binaries anyway so it's better to just be
2727
# explicit and sign everything in order to be clear what we are doing.
28-
if [ -d $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A ]; then
28+
if [ -d "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A" ]; then
2929
(set -x
30-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app)
30+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app")
3131
fi
3232
if [ -d $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B ]; then
3333
(set -x
34-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate
35-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app)
34+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate"
35+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app")
3636
fi
3737
set -x
38-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework
39-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/PSMTabBarControl.framework
40-
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Library/QuickLook/QLStephen.qlgenerator/Contents/MacOS/QLStephen
41-
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements $macvim_path/Contents/MacOS/Vim
42-
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements $macvim_path
38+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework"
39+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/PSMTabBarControl.framework"
40+
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Library/QuickLook/QLStephen.qlgenerator/Contents/MacOS/QLStephen"
41+
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path/Contents/MacOS/Vim"
42+
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path"
4343
fi

0 commit comments

Comments
 (0)