-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10495 from seamuslee001/CRM-20243-phpword
CRM-20243 Remove outdated sample jquery.min.js from phpword package
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
## Cleanup the vendor tree. The main issue here is that civi Civi is | ||
## deployed as a module inside a CMS, so all its source-code gets published. | ||
## Some libraries distribute admin tools and sample files which should not | ||
## be published. | ||
## | ||
## This script should be idempotent -- if you rerun it several times, it | ||
## should always produce the same post-condition. | ||
|
||
############################################################################## | ||
## usage: safe_delete <relpath...> | ||
function safe_delete() { | ||
for file in "$@" ; do | ||
if [ -z "$file" ]; then | ||
echo "Skip: empty file name" | ||
elif [ -e "$file" ]; then | ||
rm -rf "$file" | ||
fi | ||
done | ||
} | ||
|
||
############################################################################## | ||
## Remove example/CLI scripts. They're not needed and increase the attack-surface. | ||
safe_delete vendor/phpoffice/phpword/samples |