-
Notifications
You must be signed in to change notification settings - Fork 24
/
make-repo-writable.sh
executable file
·57 lines (44 loc) · 2.93 KB
/
make-repo-writable.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
echo -e "\nWARNING! Going to make all your submodules writeable!!!\n"
function make.submodule.writeable() {
local repo=$1
local install_path=$3
cd ${install_path}
echo "in [`pwd`] ..."
git remote remove origin
git remote add origin ${repo}
cd -
}
function make.submodules.writeable() {
local branch=$1
echo -e "\nInstalling the submodules on branch [${branch}] now...\n"
make.submodule.writeable "[email protected]:unicefuganda/django-eav.git" "${branch}" "ureport_project/django_eav"
make.submodule.writeable "[email protected]:unicefuganda/django-taggit.git" "${branch}" "ureport_project/django_taggit"
make.submodule.writeable "[email protected]:unicefuganda/monitor_src.git" "${branch}" "ureport_project/qos_monitor"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms.git" "${branch}" "ureport_project/rapidsms"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-auth.git" "${branch}" "ureport_project/rapidsms_auth"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-contact.git" "${branch}" "ureport_project/rapidsms_contact"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-generic.git" "${branch}" "ureport_project/rapidsms_generic"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-geoserver.git" "${branch}" "ureport_project/rapidsms_geoserver"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-httprouter.git" "${branch}" "ureport_project/rapidsms_httprouter_src"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-message-classifier.git" "${branch}" "ureport_project/rapidsms_message_classifier"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-polls.git" "${branch}" "ureport_project/rapidsms_polls"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-script.git" "${branch}" "ureport_project/rapidsms_script"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-tracking.git" "${branch}" "ureport_project/rapidsms_tracking"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-uganda-common.git" "${branch}" "ureport_project/rapidsms_uganda_common"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-uganda-ussd.git" "${branch}" "ureport_project/rapidsms_uganda_ussd"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-unregister.git" "${branch}" "ureport_project/rapidsms_unregister"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-ureport.git" "${branch}" "ureport_project/rapidsms_ureport"
make.submodule.writeable "[email protected]:unicefuganda/rapidsms-xforms.git" "${branch}" "ureport_project/rapidsms_xforms_src"
echo -e "\nDone.\n"
}
read -r -p "Are you sure? [Y/n] " response
case $response in
[yY][eE][sS]|[yY])
make.submodules.writeable
;;
*)
echo -e "\nOk, don't worry, nothing happened.\n"
;;
esac
git submodule status