Skip to content

Exclude .empty and .DS_Store files in makeV2 and buildpkg #739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CloverPackage/makeV2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ROOT="$PWD"
SYMROOT="${ROOT}"/sym
REVISION=$(git describe --tags $(git rev-list --tags --max-count=1))

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

open sym
Expand Down
1 change: 1 addition & 0 deletions CloverPackage/makeiso
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ rm -rf ${IMGROOT}/*/.s*
rm -rf ${IMGROOT}/*/*/.s*
rm -rf ${IMGROOT}/*/*/*/.s*
rm -rf ${IMGROOT}/*/*/*/*/.s*
find "${IMGROOT}" -name '.DS_Store' -exec rm -R -f {} \; 2>/dev/null
echo "[HDIUTIL] ${ISOIMAGE}"
mkdir -p ${SYMROOT}/CloverISO-${REVISION}

Expand Down
12 changes: 6 additions & 6 deletions CloverPackage/package/buildpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ addTemplateScripts () {
echo "Error addTemplateScripts: template '$templateName' doesn't exists" >&2; exit 1; }

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

files=$( find "$pkgRootDir/Scripts/" -type f )
Expand Down Expand Up @@ -524,7 +524,7 @@ main ()
choiceId="UEFI.only"
packageRefId=$(getPackageRefId "${packagesidentity}" "${choiceId}")
mkdir -p ${PKG_BUILD_DIR}/${choiceId}/Root/EFI
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \
${SRCROOT}/CloverV2/EFI/BOOT ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${choiceId}" \
--subst="INSTALLER_CHOICE=$packageRefId" MarkChoice
Expand Down Expand Up @@ -630,9 +630,9 @@ fi
--subst="CLOVER_DRIVERS_LEGACY=$DRIVERS_LEGACY" \
--subst="CLOVER_DRIVERS_UEFI=$DRIVERS_UEFI" \
${choiceId}
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \
${SRCROOT}/CloverV2/EFI/BOOT ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \
rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \
${SRCROOT}/CloverV2/EFI/CLOVER ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/

# config.plist
Expand Down Expand Up @@ -1352,7 +1352,7 @@ if [[ ${NOEXTRAS} != *"Clover Themes"* ]]; then
local themeName=${themes[$i]##*/}
[[ -n $(inArray "$themeName" ${specialThemes[@]}) ]] && continue # it is a special theme
mkdir -p "${PKG_BUILD_DIR}/${themeName}/Root/"
rsync -r --exclude=.svn --exclude="*~" "${themes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
rsync -r --exclude=.svn --exclude="*~" --exclude=".DS_Store" "${themes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
packageRefId=$(getPackageRefId "${packagesidentity}" "${themeName}")
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${themeName}" \
--subst="themeName=$themeName" \
Expand All @@ -1378,7 +1378,7 @@ if [[ ${NOEXTRAS} != *"Clover Themes"* ]]; then
# Don't add christmas and newyear themes if month < 11
[[ $currentMonth -lt 11 ]] && [[ "$themeName" == christmas ]] && continue
mkdir -p "${PKG_BUILD_DIR}/${themeName}/Root/"
rsync -r --exclude=.svn --exclude="*~" "$artwork/${specialThemes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
rsync -r --exclude=.svn --exclude="*~" --exclude=".DS_Store" "$artwork/${specialThemes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}"
packageRefId=$(getPackageRefId "${packagesidentity}" "${themeName}")
addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${themeName}" \
--subst="themeName=$themeName" \
Expand Down
Loading