Created
October 2, 2017 11:26
-
-
Save janus57/806b4f0dfd5e10795e0009f50992eeb5 to your computer and use it in GitHub Desktop.
Create a patch file for specific files (.css & .tpl) and save it under the same tree
This file contains hidden or 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
#!/bin/bash | |
FOLDER_OLD="phpboost_5-0" | |
FOLDER_NEW="phpboost_5-1" | |
FOLDER_PATCHES="./patches" | |
mkdir -p ${FOLDER_PATCHES} | |
for newfile in `find $FOLDER_NEW -type f -name "*.css" -o -name "*.tpl"` | |
do | |
sufix=${newfile#${FOLDER_NEW}/} | |
oldfile="${FOLDER_OLD}/${sufix}" | |
if [ -f $oldfile ]; then | |
patchfile="${FOLDER_PATCHES}/$sufix.patch" | |
if [ "`diff $oldfile $newfile`" != "" ]; then | |
echo "Make patch ${patchfile}" | |
mkdir -p `dirname $patchfile` && diff -dupN "$oldfile" "$newfile" > "$patchfile" | |
fi | |
fi | |
done |
This file contains hidden or 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
Example of patches between PHPBoost 5.0 and 5.1 | |
root@patcher:~# tree patches/ | |
patches/ | |
βββ articles | |
βΒ Β βββ templates | |
βΒ Β βββ articles.css.patch | |
βΒ Β βββ ArticlesDisplayArticlesController.tpl.patch | |
βΒ Β βββ ArticlesDisplaySeveralArticlesController.tpl.patch | |
βΒ Β βββ ArticlesFormFieldSelectSources.tpl.patch | |
βββ BBCode | |
βΒ Β βββ templates | |
βΒ Β βββ bbcode.css.patch | |
βΒ Β βββ bbcode_editor.tpl.patch | |
βββ calendar | |
βΒ Β βββ templates | |
βΒ Β βββ CalendarAjaxEventsController.tpl.patch | |
βΒ Β βββ calendar.css.patch | |
βΒ Β βββ CalendarDisplayEventController.tpl.patch | |
βββ connect | |
βΒ Β βββ templates | |
βΒ Β βββ connect_mini.css.patch | |
βΒ Β βββ connect_mini.tpl.patch | |
βββ contact | |
βΒ Β βββ templates | |
βΒ Β βββ ContactController.tpl.patch | |
βΒ Β βββ contact.css.patch | |
βΒ Β βββ ContactFormFieldObjectPossibleValues.tpl.patch | |
βΒ Β βββ ContactFormFieldRecipientsPossibleValues.tpl.patch | |
βββ database | |
βΒ Β βββ templates | |
βΒ Β βββ admin_database_management.tpl.patch | |
βΒ Β βββ admin_database_tools.tpl.patch | |
βββ download | |
βΒ Β βββ templates | |
βΒ Β βββ download.css.patch | |
βΒ Β βββ DownloadDisplayDownloadFileController.tpl.patch | |
βΒ Β βββ DownloadDisplaySeveralDownloadFilesController.tpl.patch | |
βΒ Β βββ download_mini.css.patch | |
βΒ Β βββ DownloadModuleMiniMenu.tpl.patch | |
βββ faq | |
βΒ Β βββ templates | |
βΒ Β βββ faq.css.patch | |
βΒ Β βββ FaqDisplaySeveralFaqQuestionsController.tpl.patch | |
βΒ Β βββ FaqModuleMiniMenu.tpl.patch | |
βββ forum | |
βΒ Β βββ templates | |
βΒ Β βββ admin_ranks_add.tpl.patch | |
βΒ Β βββ admin_ranks.tpl.patch | |
βΒ Β βββ forum_bottom.tpl.patch | |
βΒ Β βββ forum.css.patch | |
βΒ Β βββ forum_edit_msg.tpl.patch | |
βΒ Β βββ forum_forum.tpl.patch | |
βΒ Β βββ forum_index.tpl.patch | |
βΒ Β βββ forum_membermsg.tpl.patch | |
βΒ Β βββ forum_moderation_panel.tpl.patch | |
βΒ Β βββ forum_post.tpl.patch | |
βΒ Β βββ forum_topic.tpl.patch | |
βΒ Β βββ forum_top.tpl.patch | |
βΒ Β βββ forum_track.tpl.patch | |
βββ gallery | |
βΒ Β βββ templates | |
βΒ Β βββ admin_gallery_add.tpl.patch | |
βΒ Β βββ admin_gallery_config.tpl.patch | |
βΒ Β βββ admin_gallery_management.tpl.patch | |
βΒ Β βββ gallery_add.tpl.patch | |
βΒ Β βββ gallery_mini.tpl.patch | |
βΒ Β βββ gallery.tpl.patch | |
βββ install | |
βΒ Β βββ templates | |
βΒ Β βββ install.css.patch | |
βΒ Β βββ main.tpl.patch | |
βΒ Β βββ server-config.tpl.patch | |
βββ kernel | |
βΒ Β βββ lib | |
βΒ Β βββ css | |
βΒ Β βββ font-awesome | |
βΒ Β βββ css | |
βΒ Β βββ font-awesome.css.patch | |
βββ LangsSwitcher | |
βΒ Β βββ templates | |
βΒ Β βββ langsswitcher.css.patch | |
βΒ Β βββ langswitcher.tpl.patch | |
βββ media | |
βΒ Β βββ templates | |
βΒ Β βββ media_action.tpl.patch | |
βΒ Β βββ media.css.patch | |
βΒ Β βββ media.tpl.patch | |
βββ news | |
βΒ Β βββ templates | |
βΒ Β βββ news.css.patch | |
βΒ Β βββ NewsDisplayNewsController.tpl.patch | |
βΒ Β βββ NewsDisplaySeveralNewsController.tpl.patch | |
βΒ Β βββ NewsFormFieldSelectSources.tpl.patch | |
βββ newsletter | |
βΒ Β βββ templates | |
βΒ Β βββ newsletter_mini.css.patch | |
βββ online | |
βΒ Β βββ templates | |
βΒ Β βββ OnlineHomeController.tpl.patch | |
βΒ Β βββ OnlineModuleMiniMenu.tpl.patch | |
βββ pages | |
βΒ Β βββ templates | |
βΒ Β βββ action.tpl.patch | |
βΒ Β βββ admin_pages.tpl.patch | |
βΒ Β βββ explorer.tpl.patch | |
βΒ Β βββ index.tpl.patch | |
βΒ Β βββ pages.css.patch | |
βΒ Β βββ post.tpl.patch | |
βββ poll | |
βΒ Β βββ templates | |
βΒ Β βββ admin_poll_add.tpl.patch | |
βΒ Β βββ admin_poll_config.tpl.patch | |
βΒ Β βββ admin_poll_management2.tpl.patch | |
βΒ Β βββ admin_poll_management.tpl.patch | |
βΒ Β βββ poll.css.patch | |
βΒ Β βββ poll_mini.tpl.patch | |
βΒ Β βββ poll.tpl.patch | |
βββ QuestionCaptcha | |
βΒ Β βββ templates | |
βΒ Β βββ QuestionCaptchaFormFieldQuestions.tpl.patch | |
βββ ReCaptcha | |
βΒ Β βββ templates | |
βΒ Β βββ ReCaptcha.tpl.patch | |
βββ search | |
βΒ Β βββ templates | |
βΒ Β βββ admin_search.tpl.patch | |
βΒ Β βββ search.css.patch | |
βΒ Β βββ search_forms.tpl.patch | |
βΒ Β βββ search_mini.css.patch | |
βΒ Β βββ search_mini.tpl.patch | |
βΒ Β βββ search_results.tpl.patch | |
βββ shoutbox | |
βΒ Β βββ templates | |
βΒ Β βββ ShoutboxAjaxMessagesBoxController.tpl.patch | |
βΒ Β βββ ShoutboxHomeController.tpl.patch | |
βΒ Β βββ shoutbox_mini.css.patch | |
βΒ Β βββ ShoutboxModuleMiniMenu.tpl.patch | |
βββ sitemap | |
βΒ Β βββ templates | |
βΒ Β βββ export | |
βΒ Β βββ sitemap.xml.tpl.patch | |
βββ stats | |
βΒ Β βββ templates | |
βΒ Β βββ admin_stats_management.tpl.patch | |
βΒ Β βββ stats.css.patch | |
βΒ Β βββ stats_mini.tpl.patch | |
βΒ Β βββ stats.tpl.patch | |
βββ templates | |
βΒ Β βββ base | |
βΒ Β βΒ Β βββ body.tpl.patch | |
βΒ Β βΒ Β βββ frame.tpl.patch | |
βΒ Β βΒ Β βββ theme | |
βΒ Β βΒ Β βββ content.css.patch | |
βΒ Β βΒ Β βββ cssmenu.css.patch | |
βΒ Β βΒ Β βββ design.css.patch | |
βΒ Β βΒ Β βββ form.css.patch | |
βΒ Β βΒ Β βββ global.css.patch | |
βΒ Β βΒ Β βββ login.css.patch | |
βΒ Β βΒ Β βββ table.css.patch | |
βΒ Β βββ default | |
βΒ Β βββ admin | |
βΒ Β βΒ Β βββ admin_files_management.tpl.patch | |
βΒ Β βΒ Β βββ admin_files_move.tpl.patch | |
βΒ Β βΒ Β βββ admin_groups_management2.tpl.patch | |
βΒ Β βΒ Β βββ admin_index.tpl.patch | |
βΒ Β βΒ Β βββ body.tpl.patch | |
βΒ Β βΒ Β βββ frame.tpl.patch | |
βΒ Β βΒ Β βββ langs | |
βΒ Β βΒ Β βΒ Β βββ AdminLangsInstalledListController.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ AdminLangsNotInstalledListController.tpl.patch | |
βΒ Β βΒ Β βββ member | |
βΒ Β βΒ Β βΒ Β βββ AdminExtendedFieldsMemberlistController.tpl.patch | |
βΒ Β βΒ Β βββ menus | |
βΒ Β βΒ Β βΒ Β βββ content.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ links.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ menu_edition.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ menus.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ menu.tpl.patch | |
βΒ Β βΒ Β βββ modules | |
βΒ Β βΒ Β βΒ Β βββ AdminModuleAddController.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ AdminModulesManagementController.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ AdminModuleUpdateController.tpl.patch | |
βΒ Β βΒ Β βββ themes | |
βΒ Β βΒ Β βββ AdminThemesInstalledListController.tpl.patch | |
βΒ Β βΒ Β βββ AdminThemesNotInstalledListController.tpl.patch | |
βΒ Β βββ framework | |
βΒ Β βΒ Β βββ builder | |
βΒ Β βΒ Β βΒ Β βββ form | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldActionLinkList.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldAuthorizationsSetter.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldCaptcha.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldCheckbox.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldDate.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldLabel.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldMultiLineTextEditor.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldMultipleAutocompleter.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldMultipleFilePicker.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldMultipleSelectChoice.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldPossibleValues.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldset.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldShortMultiLineTextEditor.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormField.tpl.patch | |
βΒ Β βΒ Β βΒ Β βΒ Β βββ FormFieldUploadFile.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ table | |
βΒ Β βΒ Β βΒ Β βββ HTMLTable.tpl.patch | |
βΒ Β βΒ Β βββ content | |
βΒ Β βΒ Β βΒ Β βββ print.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ syndication | |
βΒ Β βΒ Β βΒ Β βββ atom.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ rss.tpl.patch | |
βΒ Β βΒ Β βββ groups_auth.tpl.patch | |
βΒ Β βΒ Β βββ helper | |
βΒ Β βΒ Β βΒ Β βββ message.tpl.patch | |
βΒ Β βΒ Β βββ menus | |
βΒ Β βΒ Β βΒ Β βββ content.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ feed.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ links.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ modules_mini.tpl.patch | |
βΒ Β βΒ Β βββ module | |
βΒ Β βΒ Β βΒ Β βββ admin_module_actions_links_menu.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ module_actions_links_menu.tpl.patch | |
βΒ Β βΒ Β βΒ Β βββ module_actions_link.tpl.patch | |
βΒ Β βΒ Β βββ util | |
βΒ Β βΒ Β βββ mini_calendar.tpl.patch | |
βΒ Β βΒ Β βββ pagination.tpl.patch | |
βΒ Β βββ js_bottom.tpl.patch | |
βΒ Β βββ js_top.tpl.patch | |
βΒ Β βββ theme | |
βΒ Β βββ admin_content.css.patch | |
βΒ Β βββ admin_cssmenu.css.patch | |
βΒ Β βββ admin_design.css.patch | |
βΒ Β βββ admin_form.css.patch | |
βΒ Β βββ admin_global.css.patch | |
βΒ Β βββ admin_menus.css.patch | |
βΒ Β βββ admin_table.css.patch | |
βΒ Β βββ default.css.patch | |
βββ ThemesSwitcher | |
βΒ Β βββ templates | |
βΒ Β βββ themeswitcher.css.patch | |
βΒ Β βββ themeswitcher.tpl.patch | |
βββ TinyMCE | |
βΒ Β βββ templates | |
βΒ Β βββ tinymce_editor.tpl.patch | |
βββ user | |
βΒ Β βββ templates | |
βΒ Β βββ moderation_panel.tpl.patch | |
βΒ Β βββ pm.tpl.patch | |
βΒ Β βββ upload_move.tpl.patch | |
βΒ Β βββ upload.tpl.patch | |
βΒ Β βββ UserExploreGroupsController.tpl.patch | |
βΒ Β βββ UserHomeProfileController.tpl.patch | |
βΒ Β βββ UserUsersListController.tpl.patch | |
βββ web | |
βΒ Β βββ templates | |
βΒ Β βββ web.css.patch | |
βΒ Β βββ WebDisplaySeveralWebLinksController.tpl.patch | |
βΒ Β βββ WebDisplayWebLinkController.tpl.patch | |
βΒ Β βββ web_mini.css.patch | |
βΒ Β βββ WebModuleMiniMenu.tpl.patch | |
βββ wiki | |
βββ templates | |
βββ admin_wiki_groups.tpl.patch | |
βββ admin_wiki.tpl.patch | |
βββ explorer.tpl.patch | |
βββ index.tpl.patch | |
βββ post.tpl.patch | |
βββ property.tpl.patch | |
βββ wiki.css.patch | |
βββ wiki_js_tools.tpl.patch | |
βββ wiki.tpl.patch | |
85 directories, 182 files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment