├── CONTRIBUTING.md ├── examples └── authors_choice.txt ├── CHANGELOG.md ├── redmine-themes └── theme.ini ├── .gitmodules ├── README.md ├── redmine-plugins └── plugin.ini └── redmine-like-a-boss.sh /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/authors_choice.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Version 0.1 (unreleased) 2 | ----------- 3 | 4 | - Redmine: version 3.2.1 5 | - Init script (runs rake/initialization for redmine) 6 | - Update script (runs rake/migrations for updated plugins/redmine) 7 | - Plugins-enable script 8 | - Plugins-disable script 9 | - Plugins-info script 10 | -------------------------------------------------------------------------------- /redmine-themes/theme.ini: -------------------------------------------------------------------------------- 1 | ; Redmine Theme inventory configuration file 2 | ; 3 | ; ------------------------------------------------ 4 | ; Example: 5 | ; ------------------------------------------------ 6 | ; 7 | ; [theme_name] 8 | ; # The name under what it should be placed (symlinked) into redmine/public/themes 9 | ; 10 | ; name = Theme Name 11 | ; # Human readable name of the theme 12 | ; 13 | ; desc = Theme Description 14 | ; # Human readable theme description 15 | ; 16 | ; author = John Smith 17 | ; # Human readable Author/Distributor of theme 18 | ; 19 | ; license = LICENSE v2 20 | ; # Human readable License information 21 | ; 22 | ; path = theme_dir 23 | ; # The folder path in redmin-themes/ of the theme 24 | ; 25 | ; repo = https://github.com/... 26 | ; # Repository url 27 | ; 28 | ; webpage = https://example.com 29 | ; # Project website url 30 | ; 31 | ; version = 0.1 32 | ; # Theme version 33 | ; 34 | ; 35 | [a1] 36 | name = a1 Theme 37 | desc = Redmine theme based on roninapp look and feel. 38 | author = RCRM 39 | license = GPLv2 40 | path = a1-theme 41 | repo = https://github.com/RCRM/a1 42 | webpage = http://www.redminecrm.com/pages/a1-theme 43 | version = 1.1.3 44 | [/a1] 45 | 46 | [circle] 47 | name = Circle Theme 48 | desc = This theme is based on Square service design with deep form elements styling. 49 | author = RCRM 50 | license = GPLv2 51 | path = circle-theme 52 | repo = https://github.com/RCRM/circle 53 | webpage = http://www.redminecrm.com/pages/circle-theme 54 | version = 2.0.2 55 | [/circle] 56 | 57 | [coffee] 58 | name = Coffee Theme 59 | desc = This theme is based on RedmineCRM theme but it’s more comfortable for issue tracking. 60 | author = RCRM 61 | license = GPLv2 62 | path = coffee-theme 63 | repo = https://github.com/RCRM/coffee 64 | webpage = http://www.redminecrm.com/pages/coffee-theme 65 | version = 0.0.4 66 | [/coffee] 67 | 68 | [gitmike] 69 | name = Redmine gitmike Theme 70 | desc = This is github-like theme for Redmine. It is based on A1 theme version 1.0.3 by Kirill Bezrukov www.redminecrm.com. 71 | author = makotokw 72 | license = GPLv3 73 | path = gitmike 74 | repo = https://github.com/makotokw/redmine-theme-gitmike 75 | webpage = 76 | version = 1.0.7 77 | [/gitmike] 78 | 79 | [highrise] 80 | name = Highrise Theme 81 | desc = Redmine theme based on 37signals Highrise CRM. 82 | author = RCRM 83 | license = GPLv2 84 | path = highrise-theme 85 | repo = https://github.com/RCRM/highrise 86 | webpage = http://www.redminecrm.com/pages/highrise-theme 87 | version = 1.1.2 88 | [/highrise] 89 | 90 | [redmine-progressive-theme] 91 | name = Progressive Redmine Theme 92 | desc = Theme extends default Redmine theme with some features. 93 | author = stgeneral 94 | license = ??? 95 | path = redmine-progressive-theme 96 | repo = https://github.com/stgeneral/redmine-progressive-theme 97 | webpage = 98 | version = ??? 99 | [/redmine-progressive-theme] 100 | 101 | [redminecrm] 102 | name = RedmineCRM Theme 103 | desc = Redmine theme based on stripe.com service styles and RedmineCRM design. 104 | author = RCRM 105 | license = GPLv2 106 | path = redminecrm-theme 107 | repo = https://github.com/RCRM/redminecrm 108 | webpage = http://www.redminecrm.com/pages/redminecrm-theme 109 | version = 0.0.2 110 | [/redminecrm] 111 | 112 | [redmine-theme-flat] 113 | name = Redmine Flat Theme 114 | desc = Flat theme for Redmine 115 | author = tsi 116 | license = WTFPL 117 | path = redmine-theme-flat 118 | repo = https://github.com/tsi/redmine-theme-flat 119 | webpage = 120 | version = ??? 121 | [/redmine-theme-flat] 122 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "redmine"] 2 | path = redmine 3 | url = https://github.com/redmine/redmine 4 | [submodule "redmine-plugins/redmine_tweaks"] 5 | path = redmine-plugins/redmine_tweaks 6 | url = https://github.com/alexandermeindl/redmine_tweaks 7 | [submodule "redmine-plugins/redmine_tags"] 8 | path = redmine-plugins/redmine_tags 9 | url = https://github.com/ixti/redmine_tags 10 | [submodule "redmine-plugins/issuefy"] 11 | path = redmine-plugins/issuefy 12 | url = https://github.com/tchx84/issuefy 13 | [submodule "redmine-plugins/redmine_accouncements"] 14 | path = redmine-plugins/redmine_accouncements 15 | url = https://github.com/buoyant/redmine_announcements 16 | [submodule "redmine-plugins/redmine_dashboard"] 17 | path = redmine-plugins/redmine_dashboard 18 | url = https://github.com/jgraichen/redmine_dashboard 19 | [submodule "redmine-plugins/progressive_projects_list"] 20 | path = redmine-plugins/progressive_projects_list 21 | url = https://github.com/stgeneral/redmine-progressive-projects-list 22 | [submodule "redmine-themes/redmine-progressive-theme"] 23 | path = redmine-themes/redmine-progressive-theme 24 | url = https://github.com/stgeneral/redmine-progressive-theme 25 | [submodule "redmine-plugins/redmine_people"] 26 | path = redmine-plugins/redmine_people 27 | url = https://github.com/RCRM/redmine_people 28 | [submodule "redmine-plugins/redmine_questions"] 29 | path = redmine-plugins/redmine_questions 30 | url = https://github.com/RCRM/redmine_questions 31 | [submodule "redmine-themes/a1-theme"] 32 | path = redmine-themes/a1-theme 33 | url = https://github.com/RCRM/a1 34 | [submodule "redmine-themes/circle-theme"] 35 | path = redmine-themes/circle-theme 36 | url = https://github.com/RCRM/circle 37 | [submodule "redmine-plugins/redmine_contacts_invoices"] 38 | path = redmine-plugins/redmine_contacts_invoices 39 | url = https://github.com/RCRM/redmine_contacts_invoices 40 | [submodule "redmine-plugins/redmine_finance"] 41 | path = redmine-plugins/redmine_finance 42 | url = https://github.com/RCRM/redmine_finance 43 | [submodule "redmine-plugins/redmine_contacts"] 44 | path = redmine-plugins/redmine_contacts 45 | url = https://github.com/RCRM/redmine_contacts 46 | [submodule "redmine-plugins/redmine_checklists"] 47 | path = redmine-plugins/redmine_checklists 48 | url = https://github.com/RCRM/redmine_checklists 49 | [submodule "redmine-plugins/redmine_agile"] 50 | path = redmine-plugins/redmine_agile 51 | url = https://github.com/RCRM/redmine_agile 52 | [submodule "redmine-plugins/redmine_zenedit"] 53 | path = redmine-plugins/redmine_zenedit 54 | url = https://github.com/RCRM/redmine_zenedit 55 | [submodule "redmine-themes/redminecrm-theme"] 56 | path = redmine-themes/redminecrm-theme 57 | url = https://github.com/RCRM/redminecrm 58 | [submodule "redmine-themes/coffee-theme"] 59 | path = redmine-themes/coffee-theme 60 | url = https://github.com/RCRM/coffee 61 | [submodule "redmine-themes/highrise-theme"] 62 | path = redmine-themes/highrise-theme 63 | url = https://github.com/RCRM/highrise 64 | [submodule "redmine-plugins/redmine_cms"] 65 | path = redmine-plugins/redmine_cms 66 | url = https://github.com/RCRM/redmine_cms 67 | [submodule "redmine-plugins/redmine_favorite_projects"] 68 | path = redmine-plugins/redmine_favorite_projects 69 | url = https://github.com/RCRM/redmine_favorite_projects 70 | [submodule "redmine-plugins/redmine_announcements"] 71 | path = redmine-plugins/redmine_announcements 72 | url = https://github.com/buoyant/redmine_announcements 73 | [submodule "redmine-plugins/redmine_issues_tree"] 74 | path = redmine-plugins/redmine_issues_tree 75 | url = https://github.com/Loriowar/redmine_issues_tree 76 | [submodule "redmine-plugins/redmine_my_page"] 77 | path = redmine-plugins/redmine_my_page 78 | url = https://github.com/jrupesh/redmine_my_page 79 | [submodule "redmine-plugins/redmine_dmsf"] 80 | path = redmine-plugins/redmine_dmsf 81 | url = https://github.com/danmunn/redmine_dmsf 82 | [submodule "redmine-plugins/redmine_planning"] 83 | path = redmine-plugins/redmine_planning 84 | url = https://github.com/MadEgg/redmine_planning 85 | [submodule "redmine-plugins/line_numbers"] 86 | path = redmine-plugins/line_numbers 87 | url = https://github.com/cdwertmann/line_numbers 88 | [submodule "redmine-plugins/redmine_didyoumean"] 89 | path = redmine-plugins/redmine_didyoumean 90 | url = https://github.com/abahgat/redmine_didyoumean 91 | [submodule "redmine-plugins/redmine_gist"] 92 | path = redmine-plugins/redmine_gist 93 | url = https://github.com/dergachev/redmine_gist 94 | [submodule "redmine-plugins/sidebar_hide"] 95 | path = redmine-plugins/sidebar_hide 96 | url = https://github.com/bdemirkir/sidebar_hide 97 | [submodule "redmine-themes/gitmike"] 98 | path = redmine-themes/gitmike 99 | url = https://github.com/makotokw/redmine-theme-gitmike 100 | [submodule "redmine-plugins/recurring_tasks"] 101 | path = redmine-plugins/recurring_tasks 102 | url = https://github.com/nutso/redmine-plugin-recurring-tasks 103 | [submodule "redmine-plugins/redmine_improved_searchbox"] 104 | path = redmine-plugins/redmine_improved_searchbox 105 | url = https://github.com/ries-tech/redmine_improved_searchbox 106 | [submodule "redmine-plugins/unread_issues"] 107 | path = redmine-plugins/unread_issues 108 | url = https://github.com/redcloak/unread_issues 109 | [submodule "redmine-themes/redmine-theme-flat"] 110 | path = redmine-themes/redmine-theme-flat 111 | url = https://github.com/tsi/redmine-theme-flat 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Redmine lik a boss 2 | 3 | Easy redmine plugin/theme management via git submodules and symlinks. 4 | 5 | Use `redmine-lile-a-boss.sh` to list available plugins and themes and enable/disable as desired. You don't need to worry about database up/down migrations or additional install builds as it is handled automatically (See [plugin.ini](https://github.com/cytopia/redmine-like-a-boss/blob/master/redmine-plugins/plugin.ini) and [theme.ini](https://github.com/cytopia/redmine-like-a-boss/blob/master/redmine-themes/theme.ini) for plugin/theme configuration. 6 | 7 | --- 8 | 9 | **STAY UP TO DATE** 10 | 11 | ```shell 12 | git pull origin master 13 | git submodule update --recursive 14 | ``` 15 | 16 | --- 17 | 18 | ### How does it work? 19 | 20 | #### Installation (enable) 21 | 22 | When plugins are chosen to be enabled, they are simply symlinked to the proper redmine plugins directory and all required tasks (db migrations, builds etc) are done afer your explicit OK. 23 | 24 | #### Uninstallation (disable) 25 | 26 | When plugins are chosen to be disabled, required tasks are run (down migrations) after your explicit OK and only the symlink is removed. The plugin directory itself will still remain untouched, ready to be enabled again. 27 | 28 | #### Updates (git pull) 29 | 30 | Plugin updates are simple too, as you only need to `git pull` in the appropriate git submodule repository. 31 | 32 | #### Manually 33 | 34 | You can also use this repository and still do everything manually. All you need to do by hand is symlink the plugin/theme to the redmine directory and run potential database migrations. 35 | 36 | 37 | 38 | ## 1. Available git modules 39 | 40 | ### 1.1 Redmine 41 | 42 | * Redmine ([redmine](https://github.com/redmine/redmine)) 3.2.1 43 | 44 | Redmine is included as a git submodule from the official repository currently in version `3.2.1`. This repository will always add the latest stable version so you only need to update `redmine-like-a-boss`. 45 | You can however checkout any version you like within the submodule to fit your needs. 46 | 47 | ### 1.2 Available Plugins 48 | 49 | See [plugin.ini](https://github.com/cytopia/redmine-like-a-boss/blob/master/redmine-plugins/plugin.ini) for description, license, author and version information. 50 | 51 | * Issuefy ([issuefy](https://github.com/tchx84/issuefy)) 52 | * Line numbers ([line_numbers](https://github.com/cdwertmann/line_numbers)) 53 | * Progressive Projects List ([progressive_projects_list](https://github.com/stgeneral/redmine-progressive-projects-list)) 54 | * Recurring Tasks ([recurring_tasks](https://github.com/nutso/redmine-plugin-recurring-tasks)) 55 | * Redmine Agile ([redmine_agile](https://github.com/RCRM/redmine_agile)) 56 | * Redmine Announcements ([redmine_announcements](https://github.com/buoyant/redmine_announcements)) 57 | * Redmine Checklists ([redmine_checklists](https://github.com/RCRM/redmine_checklists)) 58 | * Redmine CMS ([redmine_cms](https://github.com/RCRM/redmine_cms)) 59 | * Redmine CRM ([redmine_contacts](https://github.com/RCRM/redmine_contacts)) 60 | * Redmine Dashboard ([redmine_dashboard](https://github.com/jgraichen/redmine_dashboard)) 61 | * Did You Mean Plugin ([redmine_didyoumean](https://github.com/abahgat/redmine_didyoumean)) 62 | * Redmine Document Management System ([redmine_dmsf](https://github.com/danmunn/redmine_dmsf)) 63 | * Redmine Favorite projects ([redmine_favorite_projects](https://github.com/RCRM/redmine_favorite_projects)) 64 | * Redmine Finance ([redmine_finance](https://github.com/RCRM/redmine_finance)) 65 | * Redmine Gist ([redmine_gist](https://github.com/dergachev/redmine_gist)) 66 | * Project Search Box Plugin ([redmine_improved_searchbox](https://github.com/ries-tech/redmine_improved_searchbox)) 67 | * Redmine Issues Tree ([redmine_issues_tree](https://github.com/Loriowar/redmine_issues_tree)) 68 | * Redmine My Page Customization ([redmine_my_page](https://github.com/jrupesh/redmine_my_page)) 69 | * Redmine People ([redmine_people](https://github.com/RCRM/redmine_people)) 70 | * Redmine Planning ([redmine_planning](https://github.com/MadEgg/redmine_planning)) 71 | * Redmine Q&A plugin ([redmine_questions](https://github.com/RCRM/redmine_questions)) 72 | * Redmine Tags ([redmine_tags](https://github.com/ixti/redmine_tags)) 73 | * Redmine Tweaks ([redmine_tweaks](https://github.com/alexandermeindl/redmine_tweaks)) 74 | * Redmine Zen Edit ([redmine_zenedit](https://github.com/RCRM/redmine_zenedit)) 75 | * Hide Sidebar ([sidebar_hide](https://github.com/bdemirkir/sidebar_hide)) 76 | * Unread issues ([unread_issues](https://github.com/redcloak/unread_issues)) 77 | 78 | ### 1.3 Available Themes 79 | 80 | See [theme.ini](https://github.com/cytopia/redmine-like-a-boss/blob/master/redmine-themes/theme.ini) for description, license, author and version information. 81 | 82 | * A1 Theme ([a1](https://github.com/RCRM/a1)) 83 | * Circle Theme ([circle](https://github.com/RCRM/circle)) 84 | * Coffee Theme ([coffee](https://github.com/RCRM/coffee)) 85 | * Redmine Gitmike Theme ([redmine-theme-gitmike](https://github.com/makotokw/redmine-theme-gitmike)) 86 | * Highrise Theme ([highrise](https://github.com/RCRM/highrise)) 87 | * Progressive Redmine Theme ([redmine-progressive-theme](https://github.com/stgeneral/redmine-progressive-theme)) 88 | * Redmine CRM Theme ([redminecrm](https://github.com/RCRM/redminecrm)) 89 | * Redmine Theme Flat ([redmine-theme-flat](https://github.com/tsi/redmine-theme-flat)) 90 | 91 | ## 2. Usage 92 | 93 | Simply start [redmine-like-a-boss.sh](https://github.com/cytopia/redmine-like-a-boss/blob/master/redmine-like-a-boss.sh) and follow the menu structure. No action will be taken without your explicit OK. 94 | 95 | What actions does the script do? 96 | 97 | * bundle update 98 | * bundle install --without development test 99 | * Database up/down migrations 100 | * Build actions 101 | 102 | The last two actions are defined in [plugin.ini](https://github.com/cytopia/redmine-like-a-boss/blob/master/redmine-plugins/plugin.ini) for each plugin separately. 103 | 104 | 105 | ### 2.1 Main Menu 106 | ```shell 107 | ------------------------------------------------------------ 108 | - Redmine like a boss - 109 | ------------------------------------------------------------ 110 | 111 | What do you want to do? 112 | 113 | 2. List/check plugins 114 | 3. Enable plugin 115 | 4. Disable plugin 116 | 117 | 5. List/check themes 118 | 6. Enable theme 119 | 7. Disable theme 120 | 121 | 9. Exit program 122 | 123 | Enter a number between 1-9: 2 124 | ``` 125 | ### 2.2 List menu 126 | ```shell 127 | ------------------------------------------------------------ 128 | Redmine like a boss - 129 | ------------------------------------------------------------ 130 | 131 | Available plugins (26) 132 | 133 | 1 Issuefy (issuefy) (0.2.0) (Enabled) 134 | 2 Line numbers (line_numbers) (1.0.0) 135 | 3 Progressive Projects List (progressive_projects_list) (3.0.1) 136 | 4 Recurring Tasks (recurring_tasks) (1.6.0) 137 | 5 Redmine Agile (redmine_agile) (1.4.0) 138 | 6 Redmine Announcements (redmine_announcements) (1.3.0) 139 | 7 Redmine Checklists (redmine_checklists) (3.1.3) 140 | 8 Redmine CMS (redmine_cms) (0.0.3) 141 | 9 Redmine CRM (redmine_contacts) (4.0.4) 142 | 10 Redmine Dashboard (redmine_dashboard) (2.7.0) 143 | 11 Did You Mean Plugin (redmine_didyoumean) (1.2.0) 144 | 12 Redmine Document Management System (redmine_dmsf) (1.5.6) 145 | 13 Redmine Favorite projects (redmine_favorite_projects) (1.0.1) 146 | 14 Redmine Finance (redmine_finance) (2.0.1) 147 | 15 Redmine Gist (redmine_gist) (0.1.0) 148 | 16 Project Search Box Plugin (redmine_improved_searchbox) (0.0.3) 149 | 17 Redmine Issues Tree (redmine_issues_tree) (0.0.6) 150 | 18 Redmine My Page Customization (redmine_my_page) (0.1.9) 151 | 19 Redmine People (redmine_people) (1.2.0) 152 | 20 Redmine Planning (redmine_planning) (1.0.0) 153 | 21 Redmine Q&A plugin (redmine_questions) (0.0.7) 154 | 22 Redmine Tags (redmine_tags) (3.1.1) 155 | 23 Redmine Tweaks (redmine_tweaks) (0.5.7) 156 | 24 Redmine Zen Edit (redmine_zenedit) (0.0.2) 157 | 25 Hide Sidebar (sidebar_hide) (0.0.7) 158 | 26 Unread issues (unread_issues) (0.0.1) 159 | 160 | Press any key to continue... 161 | ``` 162 | 163 | ### 2.3 Enable menu 164 | ```shell 165 | ------------------------------------------------------------ 166 | - Redmine like a boss - 167 | ------------------------------------------------------------ 168 | 169 | Plugins that can be enabled 170 | 171 | 1 Line numbers (1.0.0) 172 | 2 Progressive Projects List (3.0.1) 173 | 3 Recurring Tasks (1.6.0) 174 | 4 Redmine Agile (1.4.0) 175 | 5 Redmine Announcements (1.3.0) 176 | 6 Redmine Checklists (3.1.3) 177 | 7 Redmine CMS (0.0.3) 178 | 8 Redmine CRM (4.0.4) 179 | 9 Redmine Dashboard (2.7.0) 180 | 10 Did You Mean Plugin (1.2.0) 181 | 11 Redmine Document Management System (1.5.6) 182 | 12 Redmine Favorite projects (1.0.1) 183 | 13 Redmine Finance (2.0.1) 184 | 14 Redmine Gist (0.1.0) 185 | 15 Project Search Box Plugin (0.0.3) 186 | 16 Redmine Issues Tree (0.0.6) 187 | 17 Redmine My Page Customization (0.1.9) 188 | 18 Redmine People (1.2.0) 189 | 19 Redmine Planning (1.0.0) 190 | 20 Redmine Q&A plugin (0.0.7) 191 | 21 Redmine Tags (3.1.1) 192 | 22 Redmine Tweaks (0.5.7) 193 | 23 Redmine Zen Edit (0.0.2) 194 | 24 Hide Sidebar (0.0.7) 195 | 25 Unread issues (0.0.1) 196 | 197 | Enter the number of plugin to enable or 'q' to abort: 1 198 | Symlink "Line numbers" (line_numbers) to Redmin plugin directory? (Y/n)y 199 | Update Redmine bundles? (Y/n)y 200 | Bundle updated! 201 | Install potentiel new Redmine bundles? (Y/n)y 202 | "Line numbers" does not require builds. 203 | "Line numbers" does not require database migrations. 204 | 205 | "Line numbers" installed. Restart Redmine 206 | 207 | Press any key to continue... 208 | ``` 209 | 210 | ### 2.4 Disable menu 211 | ```shell 212 | ------------------------------------------------------------ 213 | - Redmine like a boss - 214 | ------------------------------------------------------------ 215 | 216 | Uninstall plugins 217 | 218 | 1 Issuefy (0.2.0) 219 | 2 Line numbers (1.0.0) 220 | 221 | Enter the number of plugin to enable or 'q' to abort: 1 222 | Uninstall "Issuefy" (issuefy) ? (Y/n)y 223 | "Issuefy" does not require a database downgrade. 224 | Remove symlink? (Y/n)y 225 | 226 | "Issuefy" uninstalled. Restart Redmine 227 | 228 | Press any key to continue... 229 | ``` 230 | 231 | ## 3. Contribution 232 | 233 | Feel free to add more plugins. 234 | -------------------------------------------------------------------------------- /redmine-plugins/plugin.ini: -------------------------------------------------------------------------------- 1 | ; Redmine Plugin inventory configuration file 2 | ; 3 | ; ------------------------------------------------ 4 | ; Example: 5 | ; ------------------------------------------------ 6 | ; 7 | ; [plugin_name] 8 | ; # The name under what it should be placed (symlinked) into redmine/plugins 9 | ; 10 | ; name = Plugin Name 11 | ; # Human readable name of the plugin 12 | ; 13 | ; desc = Plugin Description 14 | ; # Human readable plugin description 15 | ; 16 | ; require = Requirements info 17 | ; # Human readable information about additional requirements 18 | ; 19 | ; incompat = plug1,plug2 20 | ; # Comma separated list of plugins this one is not compatible with 21 | ; 22 | ; author = John Smith 23 | ; # Human readable Author/Distributor of plugin 24 | ; 25 | ; license = LICENSE v2 26 | ; # Human readable License information 27 | ; 28 | ; path = plugin_name 29 | ; # The folder path in redmin-plugins of the plugin 30 | ; 31 | ; repo = https://github.com/... 32 | ; # Repository url 33 | ; 34 | ; webpage = https://example.com 35 | ; # Project website url 36 | ; 37 | ; version = 0.1 38 | ; # Plugin version 39 | ; 40 | ; fetch = wget https://test.zip 41 | ; # Url to download the plugin (if not on github and not included via submodule) 42 | ; 43 | ; extract = unzip -d %%PLUGIN_FOLDER%% 44 | ; # Command to extract downloaded plugin 45 | ; # Note: %%PLUGIN_FOLDER%% is a placeholder for the plugins directory 46 | ; 47 | ; build = bundle install && npm install && make css js && make min 48 | ; # Command to build the plugin (if required) 49 | ; 50 | ; install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 51 | ; # Rake command to install the plugin (if required) 52 | ; 53 | ; remove = bundle exec rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production 54 | ; # Rake command to remove the plugin (if required) 55 | ; 56 | ; /[plugin_name] 57 | ; # End tag of plugin block 58 | ; 59 | 60 | [issuefy] 61 | name = Issuefy 62 | desc = Creating issues from a spreadsheet 63 | require = 64 | incompat= 65 | author = tchx84 66 | license = GPLv2 67 | path = issuefy 68 | repo = https://github.com/tchx84/issuefy 69 | webpage = 70 | version = 0.2.0 71 | fetch = 72 | extract = 73 | build = 74 | install = 75 | remove = 76 | [/issuefy] 77 | 78 | [line_numbers] 79 | name = Line numbers 80 | desc = Line numbering in code blocks with toggle button to turn it on/off. 81 | require = 82 | incompat= 83 | author = cdwertmann 84 | license = MIT 85 | path = line_numbers 86 | repo = https://github.com/cdwertmann/line_numbers 87 | webpage = 88 | version = 1.0.0 89 | fetch = 90 | extract = 91 | build = 92 | install = 93 | remove = 94 | [/line_numbers] 95 | 96 | [progressive_projects_list] 97 | name = Progressive Projects List 98 | desc = Projects list with overall projects status-bar/percent. 99 | require = 100 | incompat= 101 | author = stgeneral 102 | license = MIT 103 | path = progressive_projects_list 104 | repo = https://github.com/stgeneral/redmine-progressive-projects-list 105 | webpage = https://stgeneral.github.io/redmine-progressive-projects-list 106 | version = 3.0.1 107 | fetch = 108 | extract = 109 | build = 110 | install = 111 | remove = 112 | [/progressive_projects_list] 113 | 114 | [recurring_tasks] 115 | name = Recurring Tasks 116 | desc = Configure recurring tasks. 117 | require = Requires cronjob: @hourly /bin/sh "cd {path_to_redmine} && bundle exec rake RAILS_ENV=production redmine:recur_tasks" >> log/cron_rake.log 2>&1 118 | incompat= 119 | author = nutso 120 | license = GPLv2 121 | path = recurring_tasks 122 | repo = https://github.com/nutso/redmine-plugin-recurring-tasks 123 | webpage = 124 | version = 1.6.0 125 | fetch = 126 | extract = 127 | build = 128 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 129 | remove = bundle exec rake redmine:plugins:migrate NAME=recurring_tasks VERSION=0 RAILS_ENV=production 130 | [/recurring_tasks] 131 | 132 | [redmine_agile] 133 | name = Redmine Agile 134 | desc = Agile Board for Redmine. 135 | require = 136 | incompat= 137 | author = RCRM 138 | license = ??? 139 | path = redmine_agile 140 | repo = https://github.com/RCRM/redmine_agile 141 | webpage = http://www.redminecrm.com/projects/agile/pages/1 142 | version = 1.4.0 143 | fetch = 144 | extract = 145 | build = 146 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 147 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_agile VERSION=0 RAILS_ENV=production 148 | [/redmine_agile] 149 | 150 | [redmine_announcements] 151 | name = Redmine Announcements 152 | desc = Site Wide Announcements in Redmine. 153 | require = 154 | incompat= 155 | author = buoyant 156 | license = ??? 157 | path = redmine_announcements 158 | repo = https://github.com/buoyant/redmine_announcements 159 | webpage = https://buoyant.github.io/redmine_announcements 160 | version = 1.3.0 161 | fetch = 162 | extract = 163 | build = 164 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 165 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_announcements VERSION=0 RAILS_ENV=production 166 | [/redmine_announcements] 167 | 168 | [redmine_checklists] 169 | name = Redmine Checklists 170 | desc = Add checklists to issues. 171 | require = 172 | incompat= 173 | author = RCRM 174 | license = ??? 175 | path = redmine_checklists 176 | repo = https://github.com/RCRM/redmine_checklists 177 | webpage = http://www.redminecrm.com/projects/checklist/pages/1 178 | version = 3.1.3 179 | fetch = 180 | extract = 181 | build = 182 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 183 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_checklists VERSION=0 RAILS_ENV=production 184 | [/redmine_checklists] 185 | 186 | [redmine_cms] 187 | name = Redmine CMS 188 | desc = Content Management Plugin for Redmine (Create pages). 189 | require = 190 | incompat= 191 | author = RCRM 192 | license = ??? 193 | path = redmine_cms 194 | repo = https://github.com/RCRM/redmine_cms 195 | webpage = http://www.redminecrm.com/projects/cms/pages/1 196 | version = 0.0.3 197 | fetch = 198 | extract = 199 | build = 200 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 201 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_cms VERSION=0 RAILS_ENV=production 202 | [/redmine_cms] 203 | 204 | [redmine_contacts] 205 | name = Redmine CRM 206 | desc = CRM plugin to manage your clients with Redmine. 207 | require = 208 | incompat= 209 | author = RCRM 210 | license = ??? 211 | path = redmine_contacts 212 | repo = https://github.com/RCRM/redmine_contacts 213 | webpage = http://www.redminecrm.com/projects/crm/pages/1 214 | version = 4.0.4 215 | fetch = 216 | extract = 217 | build = 218 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 219 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_contacts VERSION=0 RAILS_ENV=production 220 | [/redmine_contacts] 221 | 222 | [redmine_dashboard] 223 | name = Redmine Dashboard 224 | desc = Issue dashboard that supports drag and drop for issues and various filters. 225 | require = 226 | incompat= 227 | author = jgraichen 228 | license = Apache License 2.0 229 | path = redmine_dashboard 230 | repo = https://github.com/jgraichen/redmine_dashboard 231 | webpage = 232 | version = 2.7.0 233 | fetch = 234 | extract = 235 | build = 236 | install = 237 | remove = 238 | [/redmine_dashboard] 239 | 240 | [redmine_didyoumean] 241 | name = Did You Mean Plugin 242 | desc = Search for possible duplicates when users are about to open new issues. 243 | require = 244 | incompat= 245 | author = abahgat 246 | license = GPLv2 247 | path = redmine_didyoumean 248 | repo = https://github.com/abahgat/redmine_didyoumean 249 | webpage = 250 | version = 1.2.0 251 | fetch = 252 | extract = 253 | build = 254 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 255 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_didyoumean VERSION=0 RAILS_ENV=production 256 | [/redmine_didyoumean] 257 | 258 | [redmine_dmsf] 259 | name = Redmine Document Management System 260 | desc = Document Management System (with WebDAV) aimed to replace current Redmine's Documents module. 261 | require = Plugin folder must be readable by the redmine user (files will be stored inside). Make sure to backup regularly! 262 | incompat= 263 | author = danmunn 264 | license = GPLv2 265 | path = redmine_dmsf 266 | repo = https://github.com/danmunn/redmine_dmsf 267 | webpage = 268 | version = 1.5.6 269 | fetch = 270 | extract = 271 | build = 272 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 273 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf VERSION=0 RAILS_ENV=production 274 | [/redmine_dmsf] 275 | 276 | [redmine_favorite_projects] 277 | name = Redmine Favorite projects 278 | desc = Replaces Redmine projects view and add abitity to select projects in the projects jumb-box. 279 | require = 280 | incompat= 281 | author = RCRM 282 | license = GPLv2 283 | path = redmine_favorite_projects 284 | repo = https://github.com/RCRM/redmine_favorite_projects 285 | webpage = http://www.redminecrm.com/projects/favoriteprojects/pages/1 286 | version = 1.0.1 287 | fetch = 288 | extract = 289 | build = 290 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 291 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_favorite_projects VERSION=0 RAILS_ENV=production 292 | [/redmine_favorite_projects] 293 | 294 | [redmine_finance] 295 | name = Redmine Finance 296 | desc = Simple accounting plugin. 297 | require = 298 | incompat= 299 | author = RCRM 300 | license = ??? 301 | path = redmine_finance 302 | repo = https://github.com/RCRM/redmine_finance 303 | webpage = http://www.redminecrm.com/projects/finance/pages/1 304 | version = 2.0.1 305 | fetch = 306 | extract = 307 | build = 308 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 309 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_finance VERSION=0 RAILS_ENV=production 310 | [/redmine_finance] 311 | 312 | [redmine_gist] 313 | name = Redmine Gist 314 | desc = Redmine plugin adding a {{gist}} macro that embeds Github Gists into Redmine. 315 | require = 316 | incompat= 317 | author = dergachev 318 | license = 319 | path = redmine_gist 320 | repo = https://github.com/dergachev/redmine_gist 321 | webpage = 322 | version = 0.1.0 323 | fetch = 324 | extract = 325 | build = 326 | install = 327 | remove = 328 | [/redmine_gist] 329 | 330 | [redmine_improved_searchbox] 331 | name = Project Search Box Plugin 332 | desc = Converts Redmine project jumpbox with searchable Select2 combobox. 333 | require = 334 | incompat= 335 | author = ries-tech 336 | license = ??? 337 | path = redmine_improved_searchbox 338 | repo = https://github.com/ries-tech/redmine_improved_searchbox 339 | webpage = 340 | version = 0.0.3 341 | fetch = 342 | extract = 343 | build = 344 | install = 345 | remove = 346 | [/redmine_improved_searchbox] 347 | 348 | [redmine_issues_tree] 349 | name = Redmine Issues Tree 350 | desc = Provide a tree view of the issues list. 351 | require = Incompatible with scrum plugin 352 | incompat= scrum 353 | author = Loriowar 354 | license = ??? 355 | path = redmine_issues_tree 356 | repo = https://github.com/Loriowar/redmine_issues_tree 357 | webpage = 358 | version = 0.0.7 359 | fetch = 360 | extract = 361 | build = 362 | install = 363 | remove = 364 | [/redmine_issues_tree] 365 | 366 | [redmine_my_page] 367 | name = Redmine My Page Customization 368 | desc = The Plugins aims at providing some user specific customization in redmine. 369 | require = 370 | incompat= 371 | author = jrupesh 372 | license = ??? 373 | path = redmine_my_page 374 | repo = https://github.com/jrupesh/redmine_my_page 375 | webpage = 376 | version = 0.1.9 377 | fetch = 378 | extract = 379 | build = 380 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 381 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_my_page VERSION=0 RAILS_ENV=production 382 | [/redmine_my_page] 383 | 384 | [redmine_people] 385 | name = Redmine People 386 | desc = This plugin extends Redmine Users module with new UI and new features like local avatars, departments, permissions to manage users. 387 | require = 388 | incompat= 389 | author = RCRM 390 | license = GPLv2 391 | path = redmine_people 392 | repo = https://github.com/RCRM/redmine_people 393 | webpage = http://www.redminecrm.com/projects/people/pages/1 394 | version = 1.2.0 395 | fetch = 396 | extract = 397 | build = 398 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 399 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_people VERSION=0 RAILS_ENV=production 400 | [/redmine_people] 401 | 402 | [redmine_planning] 403 | name = Redmine Planning 404 | desc = This plugin is aimed to make project planning easier using Redmine (GANT enhancements: update and relate issues, drag&drop, critical path). 405 | require = 406 | incompat= 407 | author = MadEgg 408 | license = GPLv3 409 | path = redmine_planning 410 | repo = https://github.com/MadEgg/redmine_planning 411 | webpage = 412 | version = 1.0.0 413 | fetch = 414 | extract = 415 | build = 416 | install = 417 | remove = 418 | [/redmine_planning] 419 | 420 | [redmine_questions] 421 | name = Redmine Q&A plugin 422 | desc = Plugin replaces Redmine Forums module with new UI and new features like tags, votes, page views. 423 | require = 424 | incompat= 425 | author = RCRM 426 | license = GPLv2 427 | path = redmine_questions 428 | repo = https://github.com/RCRM/redmine_questions 429 | webpage = http://www.redminecrm.com/projects/questions/pages/1 430 | version = 0.0.7 431 | fetch = 432 | extract = 433 | build = 434 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 435 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_questions VERSION=0 RAILS_ENV=production 436 | [/redmine_questions] 437 | 438 | [redmine_tags] 439 | name = Redmine Tags 440 | desc = Allows marking up different models in Redmine with tags. Inspired by original redmine_tags of Eric Davis. 441 | require = 442 | incompat= 443 | author = ixti 444 | license = GPLv3 445 | path = redmine_tags 446 | repo = https://github.com/ixti/redmine_tags 447 | webpage = 448 | version = 3.1.1 449 | fetch = 450 | extract = 451 | build = 452 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 453 | remove = bundle exec rake redmine:plugins:migrate NAME=redmine_tags VERSION=0 RAILS_ENV=production 454 | [/redmine_tags] 455 | 456 | [redmine_tweaks] 457 | name = Redmine Tweaks 458 | desc = Tweaks for wiki and content including new macros. 459 | require = 460 | incompat= 461 | author = alexandermeindl 462 | license = GPLv2 463 | path = redmine_tweaks 464 | repo = https://github.com/alexandermeindl/redmine_tweaks 465 | webpage = 466 | version = 0.5.7 467 | fetch = 468 | extract = 469 | build = 470 | install = 471 | remove = 472 | [/redmine_tweaks] 473 | 474 | [redmine_zenedit] 475 | name = Redmine Zen Edit 476 | desc = This plugin allows fullscreen editing for wiki text areas. 477 | require = 478 | incompat= 479 | author = RCRM 480 | license = GPLv2 481 | path = redmine_zenedit 482 | repo = https://github.com/RCRM/redmine_zenedit 483 | webpage = http://www.redminecrm.com/projects/zenedit/pages/1 484 | version = 0.0.2 485 | fetch = 486 | extract = 487 | build = 488 | install = 489 | remove = 490 | [/redmine_zenedit] 491 | 492 | [sidebar_hide] 493 | name = Hide Sidebar 494 | desc = Adds a tiny hide button for sidebar of Redmine (Using cookie to remember status of the sidebar (hidden or not)). 495 | require = 496 | incompat= 497 | author = bdemirkir 498 | license = MIT 499 | path = sidebar_hide 500 | repo = https://github.com/bdemirkir/sidebar_hide 501 | webpage = 502 | version = 0.0.7 503 | fetch = 504 | extract = 505 | build = 506 | install = 507 | remove = 508 | [/sidebar_hide] 509 | 510 | [unread_issues] 511 | name = Unread issues 512 | desc = The plugin implements a convenient functionality of monitoring changes in issues. 513 | require = 514 | incompat= 515 | author = tdvsdv 516 | license = 517 | path = unread_issues 518 | repo = https://github.com/redcloak/unread_issues 519 | webpage = https://github.com/tdvsdv/unread_issues 520 | version = 0.0.1 521 | fetch = 522 | extract = 523 | build = 524 | install = bundle exec rake redmine:plugins:migrate RAILS_ENV=production 525 | remove = bundle exec rake redmine:plugins:migrate NAME=unread_issues VERSION=0 RAILS_ENV=production 526 | [/unread_issues] 527 | 528 | -------------------------------------------------------------------------------- /redmine-like-a-boss.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -u 2 | 3 | 4 | ################################################################################ 5 | # 6 | # V A R I A B L E S 7 | # 8 | ################################################################################ 9 | 10 | # 11 | # Redmine-like-a-boss 12 | # 13 | BASE_PATH="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)" 14 | 15 | # 16 | # Redmine 17 | # 18 | REDMINE_DIR="redmine" 19 | REDMINE_PATH="${BASE_PATH}/${REDMINE_DIR}" 20 | 21 | REDMINE_PLUGIN_DIR="plugins" 22 | REDMINE_PLUGIN_PATH="${REDMINE_PATH}/${REDMINE_PLUGIN_DIR}" 23 | 24 | REDMINE_THEME_DIR="public/themes" 25 | REDMINE_THEME_PATH="${REDMINE_PATH}/${REDMINE_THEME_DIR}" 26 | 27 | 28 | # 29 | # Plugins 30 | # 31 | AVAIL_PLUGINS_DIR="redmine-plugins" 32 | AVAIL_PLUGINS_PATH="${BASE_PATH}/${AVAIL_PLUGINS_DIR}" 33 | 34 | AVAIL_PLUGINS_CONFIG_NAME="plugin.ini" 35 | AVAIL_PLUGINS_CONFIG_PATH="${AVAIL_PLUGINS_PATH}/${AVAIL_PLUGINS_CONFIG_NAME}" 36 | 37 | # 38 | # Themes 39 | # 40 | AVAIL_THEMES_DIR="redmine-themes" 41 | AVAIL_THEMES_PATH="${BASE_PATH}/${AVAIL_THEMES_DIR}" 42 | 43 | AVAIL_THEMES_CONFIG_NAME="theme.ini" 44 | AVAIL_THEMES_CONFIG_PATH="${AVAIL_THEMES_PATH}/${AVAIL_THEMES_CONFIG_NAME}" 45 | 46 | 47 | 48 | 49 | 50 | ################################################################################ 51 | # 52 | # R E Q U I R E M E N T S 53 | # 54 | ################################################################################ 55 | 56 | 57 | # Check requirements 58 | if ! command -v rake > /dev/null 2>&1 ; then 59 | echo "binary 'rake' not found but required." 60 | exit 1 61 | fi 62 | if ! command -v bundle > /dev/null 2>&1 ; then 63 | echo "binary 'bundle' not found but required." 64 | exit 1 65 | fi 66 | if ! command -v realpath > /dev/null 2>&1 ; then 67 | echo "binary 'realpath' not found but required." 68 | exit 1 69 | fi 70 | 71 | 72 | 73 | 74 | ################################################################################ 75 | # 76 | # H E L P E R S 77 | # 78 | ################################################################################ 79 | 80 | 81 | # Ask a yes/no question and read users choise 82 | # 83 | # @param string Question to ask 84 | # @param string Default 'Y' or 'N' 85 | # @return int 1: yes | 0:no 86 | _ask() { 87 | question=$1 88 | 89 | while true; do 90 | 91 | if [ "${2:-}" = "Y" ]; then 92 | prompt="$(tput setaf 3)Y$(tput sgr0)/$(tput setaf 3)n$(tput sgr0)" 93 | default=Y 94 | elif [ "${2:-}" = "N" ]; then 95 | prompt="$(tput setaf 3)y$(tput sgr0)/$(tput setaf 3)N$(tput sgr0)" 96 | default=N 97 | else 98 | prompt="$(tput setaf 3)y$(tput sgr0)/$(tput setaf 3)n$(tput sgr0)" 99 | default= 100 | fi 101 | 102 | 103 | # /dev/tty for redirection 104 | read -p "$(tput setaf 2)${question} $(tput sgr0)(${prompt})" yn /dev/null 2>&1; then 297 | 298 | _section="$( echo "${valid_sections}" | grep -oE "^${number}:[[:space:]]*.*" | sed "s/${number}:[[:space:]]*//" )" 299 | _name="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${_section}" "name" )" 300 | _path="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${_section}" "path" )" 301 | _build="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${_section}" "build" )" 302 | _install="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${_section}" "install" )" 303 | 304 | 305 | 306 | if _ask "Symlink \"${_name}\" (${_section}) to Redmin plugin directory?" "Y"; then 307 | 308 | ### 01 Symlink 309 | cd "${BASE_PATH}" 310 | ln -s "../../${AVAIL_PLUGINS_DIR}/${_path}" "${REDMINE_DIR}/${REDMINE_PLUGIN_DIR}/${_section}" 311 | 312 | ### 02 Update Bundles 313 | if _ask "Update Redmine bundles?" "Y"; then 314 | cd "${REDMINE_PATH}" 315 | bundle update 316 | fi 317 | 318 | ### 03 Install Bundles 319 | if _ask "Install potentiel new Redmine bundles?" "Y"; then 320 | cd "${REDMINE_PATH}" 321 | bundle install --without development test 322 | fi 323 | 324 | ### 04 Build Plugin 325 | if [ "${_build}" != "" ]; then 326 | echo "\"${_name}\" requires to be build first with the following command:" 327 | echo " \$ ${_build}" 328 | if _ask "Execute build?" "Y"; then 329 | cd "${AVAIL_PLUGINS_PATH}/${_section}/" 330 | eval "${_build}" 331 | fi 332 | else 333 | echo "\"${_name}\" does not require builds." 334 | fi 335 | 336 | ### 05 Database migrations 337 | if [ "${_install}" != "" ]; then 338 | echo "\"${_name}\" requires the following database migrations:" 339 | echo " \$ ${_install}" 340 | if _ask "Run database migrations?" "Y"; then 341 | cd "${REDMINE_PATH}" 342 | eval "${_install}" 343 | fi 344 | else 345 | echo "\"${_name}\" does not require database migrations." 346 | fi 347 | 348 | echo 349 | echo "\"${_name}\" installed. Restart Redmine" 350 | echo 351 | 352 | else 353 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 354 | fi 355 | _pause 356 | fi 357 | fi 358 | 359 | done 360 | 361 | echo 362 | _pause 363 | } 364 | 365 | 366 | 367 | 368 | 369 | 370 | disable_plugin() { 371 | 372 | while true; do 373 | 374 | plugins="$( _ini_get_all_sections "${AVAIL_PLUGINS_CONFIG_PATH}" )" 375 | 376 | _show_header 377 | echo 378 | echo "Uninstall plugins" 379 | echo 380 | 381 | i=1 382 | valid_numbers="" 383 | valid_sections="" 384 | 385 | 386 | cd "${REDMINE_PLUGIN_PATH}" 387 | symlinks="$( find . -type l )" 388 | 389 | 390 | for symlink in ${symlinks}; do 391 | 392 | # Remove leading './' to get the section name 393 | section="$( echo "${symlink}" | sed 's|\./||g' )" 394 | 395 | name="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${section}" "name" )" 396 | path="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${section}" "path" )" 397 | version="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${section}" "version" )" 398 | 399 | # Check if plugin exists and has a valid path 400 | _err="0" 401 | if [ "${path}" = "" ]; then 402 | _err="1" 403 | elif [ ! -d "${AVAIL_PLUGINS_PATH}/${path}" ]; then 404 | _err="2" 405 | fi 406 | 407 | # Check if plugin is symlinked (enabled) 408 | _enabled="0" 409 | if [ -L "${REDMINE_PLUGIN_PATH}/${section}" ]; then 410 | # Check symlink 411 | real_path="$( realpath "${REDMINE_PLUGIN_PATH}/${section}" )" 412 | plug_path="${AVAIL_PLUGINS_PATH}/${path}" 413 | 414 | if [ "${real_path}" = "${plug_path}" ]; then 415 | _enabled="1" 416 | else 417 | _err="3" 418 | fi 419 | fi 420 | 421 | # If there is no error and not enabled already 422 | if [ "${_err}" = "0" ] && [ "${_enabled}" = "1" ]; then 423 | 424 | _cnt="$(printf "%2d" "${i}")" 425 | echo "${_cnt} ${name} (${version})" 426 | 427 | valid_numbers="$( printf "%s\n%s\n" "${valid_numbers}" "${i}" )" 428 | valid_sections="$( printf "%s\n%s\n" "${valid_sections}" "${i}: ${section}" )" 429 | i="$((i + 1))" 430 | fi 431 | done 432 | 433 | echo 434 | 435 | 436 | read -p "$(tput setaf 2)Enter the number of plugin to enable or 'q' to abort: $(tput sgr0)" number /dev/null 2>&1; then 445 | 446 | _section="$( echo "${valid_sections}" | grep -oE "^${number}:[[:space:]]*.*" | sed "s/${number}:[[:space:]]*//" )" 447 | _name="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${_section}" "name" )" 448 | _remove="$( _ini_get_section_value "${AVAIL_PLUGINS_CONFIG_PATH}" "${_section}" "remove" )" 449 | 450 | 451 | if _ask "Uninstall \"${_name}\" (${_section}) ?" "Y"; then 452 | 453 | ### 01 Downgrade Plugin 454 | if [ "${_remove}" != "" ]; then 455 | echo "\"${_name}\" requires a database downgrade with the following command:" 456 | echo " \$ ${_remove}" 457 | if _ask "Execute downgrade?" "Y"; then 458 | cd "${REDMINE_PATH}" 459 | eval "${_remove}" 460 | 461 | if _ask "Remove symlink?" "Y"; then 462 | rm "${REDMINE_PLUGIN_PATH}/${_section}" 463 | echo 464 | echo "\"${_name}\" uninstalled. Restart Redmine" 465 | echo 466 | else 467 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 468 | fi 469 | else 470 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 471 | fi 472 | else 473 | echo "\"${_name}\" does not require a database downgrade." 474 | if _ask "Remove symlink?" "Y"; then 475 | rm "${REDMINE_PLUGIN_PATH}/${_section}" 476 | echo 477 | echo "\"${_name}\" uninstalled. Restart Redmine" 478 | echo 479 | else 480 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 481 | fi 482 | fi 483 | else 484 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 485 | fi 486 | _pause 487 | fi 488 | fi 489 | 490 | done 491 | 492 | echo 493 | _pause 494 | } 495 | 496 | 497 | 498 | 499 | ################################################################################ 500 | # 501 | # T H E M E F U N C T I O N S 502 | # 503 | ################################################################################ 504 | 505 | # 506 | # List/Check Theme 507 | # 508 | list_themes() { 509 | 510 | themes="$( _ini_get_all_sections "${AVAIL_THEMES_CONFIG_PATH}" )" 511 | count="$( echo "${themes}" | grep -c '' )" 512 | 513 | _show_header 514 | echo 515 | echo "Available themes (${count})" 516 | echo 517 | 518 | i=1 519 | for section in ${themes}; do 520 | 521 | _cnt="$(printf "%2d" "${i}")" 522 | 523 | name="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "name" )" 524 | path="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "path" )" 525 | version="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "version" )" 526 | 527 | # Check if theme exists and has a valid path 528 | _err="" 529 | if [ "${path}" = "" ]; then 530 | _err=" $(tput setaf 1)(Broken: No path specified in ${AVAIL_THEMES_CONFIG_NAME})$(tput sgr0)" 531 | elif [ ! -d "${AVAIL_THEMES_PATH}/${path}" ]; then 532 | _err=" $(tput setaf 1)(Broken: Invalid path: ${AVAIL_THEMES_DIR}/${path})$(tput sgr0)" 533 | fi 534 | 535 | # Check if theme is symlinked (enabled) 536 | _enabled="" 537 | if [ -L "${REDMINE_THEME_PATH}/${section}" ]; then 538 | # Check symlink 539 | real_path="$( realpath "${REDMINE_THEME_PATH}/${section}" )" 540 | theme_path="${AVAIL_THEMES_PATH}/${path}" 541 | 542 | if [ "${real_path}" = "${theme_path}" ]; then 543 | _enabled=" $(tput setaf 2)(Enabled)$(tput sgr0)" 544 | else 545 | _err=" $(tput setaf 1)(Enabled but broken: Invalid symlink for ${AVAIL_THEMES_DIR}/${section})$(tput sgr0)" 546 | fi 547 | fi 548 | 549 | echo "${_cnt} ${name} (${section}) (${version})${_err}${_enabled}" 550 | 551 | i="$((i + 1))" 552 | done 553 | 554 | echo 555 | _pause 556 | } 557 | 558 | 559 | # 560 | # Enable Theme 561 | # 562 | enable_theme() { 563 | 564 | while true; do 565 | 566 | themes="$( _ini_get_all_sections "${AVAIL_THEMES_CONFIG_PATH}" )" 567 | 568 | _show_header 569 | echo 570 | echo "Themes that can be enabled" 571 | echo 572 | 573 | i=1 574 | valid_numbers="" 575 | valid_sections="" 576 | for section in ${themes}; do 577 | 578 | name="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "name" )" 579 | path="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "path" )" 580 | version="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "version" )" 581 | 582 | # Check if theme exists and has a valid path 583 | _err="0" 584 | if [ "${path}" = "" ]; then 585 | _err="1" 586 | elif [ ! -d "${AVAIL_THEMES_PATH}/${path}" ]; then 587 | _err="2" 588 | fi 589 | 590 | # Check if theme is symlinked (enabled) 591 | # Symlink could be broken, but still there 592 | # in that case we cannot enable a theme with the same name 593 | _enabled="0" 594 | if [ -L "${REDMINE_THEME_PATH}/${section}" ]; then 595 | _enabled="1" 596 | fi 597 | 598 | # If there is no error and not enabled already 599 | if [ "${_err}" = "0" ] && [ "${_enabled}" = "0" ]; then 600 | 601 | _cnt="$(printf "%2d" "${i}")" 602 | echo "${_cnt} ${name} (${version})" 603 | 604 | valid_numbers="$( printf "%s\n%s\n" "${valid_numbers}" "${i}" )" 605 | valid_sections="$( printf "%s\n%s\n" "${valid_sections}" "${i}: ${section}" )" 606 | i="$((i + 1))" 607 | fi 608 | done 609 | 610 | echo 611 | 612 | 613 | read -p "$(tput setaf 2)Enter the number of theme to enable or 'q' to abort: $(tput sgr0)" number /dev/null 2>&1; then 622 | 623 | _section="$( echo "${valid_sections}" | grep -oE "^${number}:[[:space:]]*.*" | sed "s/${number}:[[:space:]]*//" )" 624 | _name="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${_section}" "name" )" 625 | _path="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${_section}" "path" )" 626 | 627 | if _ask "Symlink \"${_name}\" (${_section}) to Redmin themes directory?" "Y"; then 628 | 629 | ### 01 Symlink 630 | cd "${BASE_PATH}" 631 | ln -s "../../../${AVAIL_THEMES_DIR}/${_path}" "${REDMINE_DIR}/${REDMINE_THEME_DIR}/${_section}" 632 | 633 | echo 634 | echo "\"${_name}\" installed. View Redmine Administration page." 635 | echo 636 | 637 | else 638 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 639 | fi 640 | _pause 641 | fi 642 | fi 643 | 644 | done 645 | 646 | echo 647 | _pause 648 | } 649 | 650 | 651 | # 652 | # Disable Theme 653 | # 654 | disable_theme() { 655 | 656 | while true; do 657 | 658 | themes="$( _ini_get_all_sections "${AVAIL_THEMES_CONFIG_PATH}" )" 659 | 660 | _show_header 661 | echo 662 | echo "Uninstall theme" 663 | echo 664 | 665 | i=1 666 | valid_numbers="" 667 | valid_sections="" 668 | 669 | 670 | cd "${REDMINE_THEME_PATH}" 671 | symlinks="$( find . -type l )" 672 | 673 | 674 | for symlink in ${symlinks}; do 675 | 676 | # Remove leading './' to get the section name 677 | section="$( echo "${symlink}" | sed 's|\./||g' )" 678 | 679 | name="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "name" )" 680 | path="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "path" )" 681 | version="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${section}" "version" )" 682 | 683 | # Check if theme exists and has a valid path 684 | _err="0" 685 | if [ "${path}" = "" ]; then 686 | _err="1" 687 | elif [ ! -d "${AVAIL_THEMES_PATH}/${path}" ]; then 688 | _err="2" 689 | fi 690 | 691 | # Check if theme is symlinked (enabled) 692 | _enabled="0" 693 | if [ -L "${REDMINE_THEME_PATH}/${section}" ]; then 694 | # Check symlink 695 | real_path="$( realpath "${REDMINE_THEME_PATH}/${section}" )" 696 | theme_path="${AVAIL_THEMES_PATH}/${path}" 697 | 698 | if [ "${real_path}" = "${theme_path}" ]; then 699 | _enabled="1" 700 | else 701 | _err="3" 702 | fi 703 | fi 704 | 705 | # If there is no error and not enabled already 706 | if [ "${_err}" = "0" ] && [ "${_enabled}" = "1" ]; then 707 | 708 | _cnt="$(printf "%2d" "${i}")" 709 | echo "${_cnt} ${name} (${version})" 710 | 711 | valid_numbers="$( printf "%s\n%s\n" "${valid_numbers}" "${i}" )" 712 | valid_sections="$( printf "%s\n%s\n" "${valid_sections}" "${i}: ${section}" )" 713 | i="$((i + 1))" 714 | fi 715 | done 716 | 717 | echo 718 | 719 | 720 | read -p "$(tput setaf 2)Enter the number of theme to enable or 'q' to abort: $(tput sgr0)" number /dev/null 2>&1; then 729 | 730 | _section="$( echo "${valid_sections}" | grep -oE "^${number}:[[:space:]]*.*" | sed "s/${number}:[[:space:]]*//" )" 731 | _name="$( _ini_get_section_value "${AVAIL_THEMES_CONFIG_PATH}" "${_section}" "name" )" 732 | 733 | 734 | if _ask "Uninstall \"${_name}\" (${_section}) ?" "Y"; then 735 | 736 | ### 01 Remove Symlink 737 | if _ask "Remove symlink?" "Y"; then 738 | rm "${REDMINE_THEME_PATH}/${_section}" 739 | echo 740 | echo "\"${_name}\" uninstalled. Make sure it is disabled in Redmine" 741 | echo 742 | else 743 | echo "$(tput setaf 1)Aborted$(tput sgr0)" 744 | fi 745 | fi 746 | _pause 747 | fi 748 | fi 749 | 750 | done 751 | 752 | echo 753 | _pause 754 | } 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | ################################################################################ 764 | # 765 | # M A I N F U N C T I O N S 766 | # 767 | ################################################################################ 768 | 769 | 770 | main_menu() { 771 | 772 | while true; do 773 | 774 | _show_header 775 | 776 | echo 777 | echo "What do you want to do?" 778 | echo 779 | # echo " 1. Update sources (Do this first)" 780 | # echo 781 | echo " 2. List/check plugins" 782 | echo " 3. Enable plugin" 783 | echo " 4. Disable plugin" 784 | echo 785 | echo " 5. List/check themes" 786 | echo " 6. Enable theme" 787 | echo " 7. Disable theme" 788 | echo 789 | # echo " 8. Help" 790 | echo " 9. Exit program" 791 | echo 792 | 793 | read -p "$(tput setaf 2)Enter a number between 1-9: $(tput sgr0)" number