Skip to content
Snippets Groups Projects
Unverified Commit bfa480ef authored by Bob Mottram's avatar Bob Mottram
Browse files

Preamble actually isn't needed

variables come from the calling script
parent c14f73af
No related branches found
No related tags found
No related merge requests found
......@@ -28,49 +28,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
NO_OF_ARGS=$#
PROJECT_NAME='freedombone'
export TEXTDOMAIN=$PROJECT_NAME-utils-git
export TEXTDOMAINDIR="/usr/share/locale"
# An optional configuration file which overrides some of these variables
CONFIGURATION_FILE="${PROJECT_NAME}.cfg"
if [ -f ~/${PROJECT_NAME}.cfg ]; then
CONFIGURATION_FILE=~/${PROJECT_NAME}.cfg
fi
# friends repo mirrors
FRIENDS_MIRRORS_SERVER=
FRIENDS_MIRRORS_PASSWORD=
FRIENDS_MIRRORS_SSH_PORT=
function get_friends_servers {
if [ -f $CONFIGURATION_FILE ]; then
if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
fi
if [ ! $FRIENDS_MIRRORS_SERVER ]; then
echo "1"
return
fi
if [ ${#FRIENDS_MIRRORS_SERVER} -lt 2 ]; then
echo "1"
return
fi
echo "0"
}
function git_clone {
repo_url="$1"
destination_dir="$2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment