From 1eadeaf3eff5ff58aa2d5225c6991fdac3bd4a40 Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Wed, 14 Sep 2016 09:26:05 +0200 Subject: [PATCH] scripts: Add global git checkout script --- scripts/checkout.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/checkout.sh diff --git a/scripts/checkout.sh b/scripts/checkout.sh new file mode 100755 index 0000000..b3166e0 --- /dev/null +++ b/scripts/checkout.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +checkout_if_exists() { + if [ -d $1 ]; then + pushd $1 >/dev/null + git checkout $2 + popd >/dev/null + fi +} + + +checkout_if_exists . $1 +checkout_if_exists module/MonarcCore $1 +checkout_if_exists module/MonarcBO $1 +checkout_if_exists module/MonarcFO $1 +checkout_if_exists node_modules/ng_backoffice $1 +checkout_if_exists node_modules/ng_client $1 +checkout_if_exists node_modules/ng_anr $1