Skip to content

Instantly share code, notes, and snippets.

@dnebing
Created May 20, 2016 03:44
Show Gist options
  • Save dnebing/91988452fb97ca8d950327529bb7ebce to your computer and use it in GitHub Desktop.
Save dnebing/91988452fb97ca8d950327529bb7ebce to your computer and use it in GitHub Desktop.
Shell script to clone the new portal modules. Works if you have "npm install -g gh" command. Be sure to edit for your own github id.
#!/bin/sh
# This shell script should allow a portal developer to clone and check out each of the
# separate portal projects.
GITHUB_ID=dnebing
LIFERAY_REPO_ROOT="https://github.com/liferay"
PERSONAL_REPO_ROOT="https://github.com/$GITHUB_ID"
REPOS="com-liferay-announcements com-liferay-application-list com-liferay-asset com-liferay-blogs com-liferay-bookmarks com-liferay-calendar com-liferay-comment com-liferay-configuration-admin com-liferay-contacts com-liferay-directory com-liferay-document-library com-liferay-dynamic-data-lists com-liferay-dynamic-data-mapping com-liferay-expando com-liferay-export-import com-liferay-flags com-liferay-frontend-css com-liferay-frontend-editor com-liferay-frontend-js com-liferay-frontend-taglib com-liferay-frontend-theme com-liferay-hello-soy com-liferay-hello-velocity com-liferay-hello-world com-liferay-iframe com-liferay-image-uploader com-liferay-invitation com-liferay-ip-geocoder com-liferay-item-selector com-liferay-journal com-liferay-layout com-liferay-license-manager com-liferay-login com-liferay-map com-liferay-marketplace com-liferay-mentions com-liferay-message-boards com-liferay-microblogs com-liferay-mobile-device-rules com-liferay-monitoring com-liferay-my-account com-liferay-nested-portlets com-liferay-notifications com-liferay-osgi com-liferay-password-policies-admin com-liferay-petra com-liferay-plugins-admin com-liferay-polls com-liferay-portal com-liferay-portal-background-task com-liferay-portal-cache com-liferay-portal-configuration com-liferay-portal-instances com-liferay-portal-language com-liferay-portal-lock com-liferay-portal-osgi-web com-liferay-portal-portlet-bridge com-liferay-portal-remote com-liferay-portal-reports-engine com-liferay-portal-rules-engine com-liferay-portal-scheduler com-liferay-portal-scripting com-liferay-portal-search com-liferay-portal-security com-liferay-portal-security-audit com-liferay-portal-security-sso com-liferay-portal-settings com-liferay-portal-store com-liferay-portal-template com-liferay-portal-workflow com-liferay-portlet-configuration com-liferay-portlet-display-template com-liferay-product-navigation com-liferay-quick-note com-liferay-ratings com-liferay-recent-documents com-liferay-roles com-liferay-rss com-liferay-screens com-liferay-server com-liferay-site com-liferay-site-navigation com-liferay-social com-liferay-staging com-liferay-sync com-liferay-trash com-liferay-user-groups-admin com-liferay-users-admin com-liferay-web-proxy com-liferay-wiki com-liferay-xsl-content com-liferay-xstream"
for repo in $REPOS
do
LR_URL="$LIFERAY_REPO_ROOT/$repo"
PER_URL="$PERSONAL_REPO_ROOT/$repo"
echo Processing $repo...
# first we need to fork the repo
# gh re -f alloy-ui -u liferay
gh re -f $repo -u liferay
# force a sleep to give github time to complete the forking...
sleep 20
# now we can clone the repo
git clone $PER_URL
# now we should set up the upstream
cd $repo
git remote add upstream $LR_URL
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment