Skip to content

scripts clean all except

João M. Lourenço edited this page Feb 3, 2025 · 1 revision

clean-all-except.sh

Given a University or School and a set languages, this Bash script removes most of the remaining unnecessary files. The script should be executed in the template's root folder/directory.

Usage: [-f] clean-all-except.sh [-l lang1[,lang2,…]] university[/school]
               -f => remove 'original' figures from Chapters/Figures.
                     NOTICE that the original example chapters will not
                     compile anymore. It is rather safe to use this option
                     once you have your own document and have no need for
                     the original figures.
               -l => receives a list of languages to keep (separated by commas)…
                     all the files pertaining to other languages are removed.
       university => remove all customization files
                     except for those of the given 'university'.
university/school => remove all customization files
                     except for those of the given 'university/school'.

The following example will remove all the files pertaining to languages other than Portuguese and English, and all the files with University/School customization except for nova/fct (NOVA FCT).

bash clean-all-except.sh -l pt,en nova/fct

clean-all-except.zip