Skip to content

Commit dcf909f

Browse files
authored
Merge pull request #739 from stevezhengshiqi/master
Exclude .empty and .DS_Store files in makeV2 and buildpkg
2 parents ad12432 + 2c9531f commit dcf909f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CloverPackage/makeV2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ ROOT="$PWD"
77
SYMROOT="${ROOT}"/sym
88
REVISION=$(git describe --tags $(git rev-list --tags --max-count=1))
99

10-
zip -qr CloverV2-${REVISION}.zip CloverV2
10+
# zip CloverV2, excluding all .empty and all .DS_Store
11+
zip -qr CloverV2-${REVISION}.zip CloverV2 -x "*/.DS_Store" "*/.empty"
1112
mv CloverV2-${REVISION}.zip $SYMROOT
1213

1314
open sym

CloverPackage/makeiso

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ rm -rf ${IMGROOT}/*/.s*
171171
rm -rf ${IMGROOT}/*/*/.s*
172172
rm -rf ${IMGROOT}/*/*/*/.s*
173173
rm -rf ${IMGROOT}/*/*/*/*/.s*
174+
find "${IMGROOT}" -name '.DS_Store' -exec rm -R -f {} \; 2>/dev/null
174175
echo "[HDIUTIL] ${ISOIMAGE}"
175176
mkdir -p ${SYMROOT}/CloverISO-${REVISION}
176177

CloverPackage/package/buildpkg.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ addTemplateScripts () {
265265
echo "Error addTemplateScripts: template '$templateName' doesn't exists" >&2; exit 1; }
266266

267267
# Copy files to destination
268-
rsync -pr --exclude=.svn --exclude="*~" "$templateRootDir/" "$pkgRootDir/Scripts/"
268+
rsync -pr --exclude=.svn --exclude="*~" --exclude=".DS_Store" "$templateRootDir/" "$pkgRootDir/Scripts/"
269269
done
270270

271271
files=$( find "$pkgRootDir/Scripts/" -type f )
@@ -524,7 +524,7 @@ main ()
524524
choiceId="UEFI.only"
525525
packageRefId=$(getPackageRefId "${packagesidentity}" "${choiceId}")
526526
mkdir -p ${PKG_BUILD_DIR}/${choiceId}/Root/EFI
527-
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \
527+
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \
528528
${SRCROOT}/CloverV2/EFI/BOOT ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/
529529
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${choiceId}" \
530530
--subst="INSTALLER_CHOICE=$packageRefId" MarkChoice
@@ -630,9 +630,9 @@ fi
630630
--subst="CLOVER_DRIVERS_LEGACY=$DRIVERS_LEGACY" \
631631
--subst="CLOVER_DRIVERS_UEFI=$DRIVERS_UEFI" \
632632
${choiceId}
633-
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \
633+
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \
634634
${SRCROOT}/CloverV2/EFI/BOOT ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/
635-
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \
635+
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \
636636
${SRCROOT}/CloverV2/EFI/CLOVER ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/
637637

638638
# config.plist
@@ -1352,7 +1352,7 @@ if [[ ${NOEXTRAS} != *"Clover Themes"* ]]; then
13521352
local themeName=${themes[$i]##*/}
13531353
[[ -n $(inArray "$themeName" ${specialThemes[@]}) ]] && continue # it is a special theme
13541354
mkdir -p "${PKG_BUILD_DIR}/${themeName}/Root/"
1355-
rsync -r --exclude=.svn --exclude="*~" "${themes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
1355+
rsync -r --exclude=.svn --exclude="*~" --exclude=".DS_Store" "${themes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
13561356
packageRefId=$(getPackageRefId "${packagesidentity}" "${themeName}")
13571357
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${themeName}" \
13581358
--subst="themeName=$themeName" \
@@ -1378,7 +1378,7 @@ if [[ ${NOEXTRAS} != *"Clover Themes"* ]]; then
13781378
# Don't add christmas and newyear themes if month < 11
13791379
[[ $currentMonth -lt 11 ]] && [[ "$themeName" == christmas ]] && continue
13801380
mkdir -p "${PKG_BUILD_DIR}/${themeName}/Root/"
1381-
rsync -r --exclude=.svn --exclude="*~" "$artwork/${specialThemes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
1381+
rsync -r --exclude=.svn --exclude="*~" --exclude=".DS_Store" "$artwork/${specialThemes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
13821382
packageRefId=$(getPackageRefId "${packagesidentity}" "${themeName}")
13831383
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${themeName}" \
13841384
--subst="themeName=$themeName" \

0 commit comments

Comments
 (0)