Skip to content

Instantly share code, notes, and snippets.

@riyad
Created December 15, 2012 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riyad/4290055 to your computer and use it in GitHub Desktop.
Save riyad/4290055 to your computer and use it in GitHub Desktop.
Automatically change GitLab's configs for https://github.com/gitlabhq/gitlabhq/pull/2247
#!/bin/bash
for f in `grep -rl Gitlab.config app config features lib spec`
do
for c in `cat gitlab_config_keys.list`
do
mv $f $f.bak
perl -pe $c $f.bak > $f
rm -f $f.bak
done
done
s/Gitlab.config.web_protocol/Gitlab.config.gitlab.protocol/g
s/Gitlab.config.web_host/Gitlab.config.gitlab.host/g
s/Gitlab.config.email_from/Gitlab.config.gitlab.email_from/g
s/Gitlab.config.url/Gitlab.config.gitlab.url/g
s/Gitlab.config.web_port/Gitlab.config.gitlab.port/g
s/Gitlab.config.web_custom_port\?/Gitlab.config.gitlab_on_non_standard_port\?/g
s/Gitlab.config.ssh_port/Gitlab.config.gitolite.ssh_port/g
s/Gitlab.config.ssh_user/Gitlab.config.gitolite.ssh_user/g
s/Gitlab.config.ssh_host/Gitlab.config.gitolite.ssh_host/g
s/Gitlab.config.ssh_path/Gitlab.config.gitolite.ssh_path_prefix/g
s/Gitlab.config.git_base_path/Gitlab.config.gitolite.repos_path/g
s/Gitlab.config.git_hooks_path/Gitlab.config.gitolite.hooks_path/g
s/Gitlab.config.git_upload_pack/Gitlab.config.gitolite.upload_pack/g
s/Gitlab.config.git_receive_pack/Gitlab.config.gitolite.receive_pack/g
s/Gitlab.config.git_bin_path/Gitlab.config.git.bin_path/g
s/Gitlab.config.git_max_size/Gitlab.config.git.max_size/g
s/Gitlab.config.git_timeout/Gitlab.config.git.timeout/g
s/Gitlab.config.gitolite_admin_uri/Gitlab.config.gitolite.admin_uri/g
s/Gitlab.config.gitolite_config_file/Gitlab.config.gitolite.config_file/g
s/Gitlab.config.gitolite_admin_key/Gitlab.config.gitolite.admin_key/g
s/Gitlab.config.default_projects_limit/Gitlab.config.gitlab.default_projects_limit/g
s/Gitlab.config.backup_path/Gitlab.config.backup.path/g
s/Gitlab.config.backup_keep_time/Gitlab.config.backup.keep_time/g
s/Gitlab.config.ldap_enabled\?/Gitlab.config.ldap.enabled/g
s/Gitlab.config.omniauth_enabled\?/Gitlab.config.omniauth.enabled/g
s/Gitlab.config.omniauth_providers/Gitlab.config.omniauth.providers/g
s/Gitlab.config.gravatar_url/Gitlab.config.gravatar.plain_url/g
s/Gitlab.config.gravatar_ssl_url/Gitlab.config.gravatar.ssl_url/g
s/Gitlab.config.stub\(git_base_path:/Gitlab.config.gitolite.stub\(repos_path:/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment