{"id":16809377,"url":"https://github.com/alias-mac/layout-upgrader","last_synced_at":"2025-03-17T09:43:51.588Z","repository":{"id":8802148,"uuid":"10496708","full_name":"alias-mac/layout-upgrader","owner":"alias-mac","description":"Sugar 7.0 Layout metadata upgrader","archived":false,"fork":false,"pushed_at":"2013-06-06T17:45:01.000Z","size":188,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-14T10:01:56.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alias-mac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-05T06:48:17.000Z","updated_at":"2013-10-18T22:34:43.000Z","dependencies_parsed_at":"2022-08-24T06:21:04.599Z","dependency_job_id":null,"html_url":"https://github.com/alias-mac/layout-upgrader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alias-mac%2Flayout-upgrader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alias-mac%2Flayout-upgrader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alias-mac%2Flayout-upgrader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alias-mac%2Flayout-upgrader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alias-mac","download_url":"https://codeload.github.com/alias-mac/layout-upgrader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244012732,"owners_count":20383642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:01:49.037Z","updated_at":"2025-03-17T09:43:51.567Z","avatar_url":"https://github.com/alias-mac.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Layout Upgrader\n\nThis is the Sugar 7.0 Layout upgrader.\n\n## How to use the script\n\nYou can ask for help anytime by simply run:\n```bash\n$ ./update-layouts -h\n```\n\nYou can run this with directories:\n\n```bash\n$ ./update-layouts -d=\"directory/to/convert\"\n$ ./update-layouts --dir=\"directory/to/convert\"\n```\n\nOr files only:\n\n```bash\n$ ./update-layouts -f=\"file/to/convert\"\n$ ./update-layouts --file=\"file/to/convert\"\n```\n\nBoth can be have multiple values:\n\n```bash\n$ ./update-layouts -d=\"directory1/to/convert\" -d=\"directory2/to/convert\"\n$ ./update-layouts -f=\"file1/to/convert\" -f=\"file2/to/convert\"\n```\n\nDirectories can have regex patterns (that will be used by glob):\n\n```bash\n$ ./update-layouts -d=\"directory1/*/to/*/convert\"\n```\n\nFor your convenience, you can keep the script out of the sugarcrm path and\ncombine the params above with the path of the [SugarCRM][SugarCRM] instance to\nupdate:\n\n```bash\n$ ./update-layouts -p=\"path/to/sugarcrm\" -d=\"directory/to/convert\"\n$ ./update-layouts --path=\"path/to/sugarcrm\" -d=\"directory/to/convert\"\n```\n\nIn order to avoid mistakes, you can see how the script will handle the params\nby passing the `--dry-run` option.\n\n```bash\n$ ./update-layouts -p=\"path/to/sugarcrm\" -d=\"directory/to/convert\" --dry-run\n```\n\nTo see more output information from the script, you can use the `-v` option\n(for verbose).\n\n```bash\n$ ./update-layouts -p=\"path/to/sugarcrm\" -d=\"directory/to/convert\" --dry-run -v\n```\n\nYou can pass the header file\n```bash\n$ ./update-layouts -p=\"path/to/sugarcrm\" -d=\"directory/to/convert\" --license=path/to/license/file\n```\n\nYou can even be bold and run the script directly from github:\n\n```bash\n$ curl -sS https://raw.github.com/alias-mac/layout-upgrader/master/update-layouts | php -- --path=\"path/to/sugarcrm\" -f=\"clients/base/layouts/activities/activities.php\" --dry-run -v\n```\n\n### Removing .orig files in a burst\n\nIf you see that the script works great, you can delete the original files by\nrunning a simple and fast command on your favorite shell:\n\n```bash\n$ find \u003cpath-to-sugarcrm\u003e -name \"*.php.orig\" --delete\n```\n\n## Have fun!\n\n## TODO\n\n- Add the ability to run PSR-2 code fixer (optional param).\n\n[SugarCRM]: http://www.sugarcrm.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falias-mac%2Flayout-upgrader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falias-mac%2Flayout-upgrader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falias-mac%2Flayout-upgrader/lists"}