3 ## Cleanup the vendor tree. The main issue here is that civi Civi is
4 ## deployed as a module inside a CMS, so all its source-code gets published.
5 ## Some libraries distribute admin tools and sample files which should not
8 ## This script should be idempotent -- if you rerun it several times, it
9 ## should always produce the same post-condition.
11 ##############################################################################
12 ## usage: safe_delete <relpath...>
13 function safe_delete
() {
15 if [ -z "$file" ]; then
16 echo "Skip: empty file name"
17 elif [ -e "$file" ]; then
23 ##############################################################################
24 ## Remove example/CLI scripts. They're not needed and increase the attack-surface.
25 safe_delete vendor
/phpoffice
/phpword
/samples