#!/bin/bash
# ===========================================================================
# Copyright (c) 2021 Eclipse Foundation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#    Christopher Guindon (Eclipse Foundation)
# ==========================================================================

# Import helper functions for this script
if [[ ! -f "../_shared/bash/import-helpers.sh" ]]
then
  echo 'Exiting... This script is not meant to be exectuted directly. See the Makefile of the project for more info.'
  exit 0
fi
source ../_shared/bash/import-helpers.sh

# Project Info
PROJECT=eclipse.org.packages
REMOTE_HOST=api-vm1

# Print project info
echo_project_info

# Import drupal files
PROJECT_FILE=$PROJECT-files.tar.gz
PROJECT_FILEPATH=www/eclipse.org-downloads-packages/sites/default
scp $REMOTE_HOST:webdev/files/$PROJECT_FILE .
import_drupal_files