Skip to content

Instantly share code, notes, and snippets.

@sokil
Created July 28, 2017 14:42
Show Gist options
  • Save sokil/e066aa0ad61ef739bad5f9c089af0cd0 to your computer and use it in GitHub Desktop.
Save sokil/e066aa0ad61ef739bad5f9c089af0cd0 to your computer and use it in GitHub Desktop.
merge_lists.sh
#!/bin/bash
bitbuckerRepoUrlList=$(cat $PROJECT_DIR/composer.json | grep bitbucket.com | awk -F'"' '{print $4}')
githubRepoUrlList=$(cat $PROJECT_DIR/composer.json | grep github.com | awk -F'"' '{print $4}')
set -- $bitbuckerRepoUrlList $githubRepoUrlList$armRepos \
"ssh://[email protected]:2600/repo1.git" \
"ssh://[email protected]:2600/repo2.git" \
"ssh://[email protected]:2600/repo3.git"
for sourceRepoUrl in "${@}"; do
echo $sourceRepoUrl;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment