| Leonardo Sandoval | 9dfdd1b | 2020-08-06 17:08:11 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash | 
| Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 2 | # | 
| Leonardo Sandoval | 579c737 | 2020-10-23 15:23:32 -0500 | [diff] [blame] | 3 | # Copyright (c) 2019-2020 Arm Limited. All rights reserved. | 
| Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 4 | # | 
|  | 5 | # SPDX-License-Identifier: BSD-3-Clause | 
|  | 6 | # | 
|  | 7 | ci_root="$(readlink -f "$(dirname "$0")/../..")" | 
|  | 8 | source "$ci_root/utils.sh" | 
|  | 9 |  | 
|  | 10 | if ! ls $project_filer/ci-scripts/ | 
|  | 11 | then | 
|  | 12 | echo "make sure /arm is mounted, if it is not, it can be mounted with the following command:" >&2 | 
|  | 13 | echo "sudo sshfs [USER]@login1.euhpc2.arm.com:/arm /arm -o allow_other,reconnect" >&2 | 
|  | 14 | echo "note that the euhpc and euhpc2 have different /arm mounts" >&2 | 
|  | 15 | exit 1 | 
|  | 16 | fi | 
|  | 17 |  | 
|  | 18 | COMMAND="cp $ci_root/script/scratch_scripts/* $project_filer/ci-scripts/" | 
|  | 19 | FILES=`ls -al "$ci_root"/script/scratch_scripts/*` | 
|  | 20 |  | 
|  | 21 | echo "files to be copied:" | 
|  | 22 | echo "$FILES" | 
|  | 23 | echo "" | 
|  | 24 | echo "####DANGER### POTENTIAL FOR DAMAGE, CHECK THIS COMMAND" | 
|  | 25 | echo "command to be run: \"$COMMAND\"" | 
|  | 26 | read -p "Run this command [Y/n]: " | 
|  | 27 | echo | 
|  | 28 | if [[ $REPLY =~ ^[Yy]$ ]] | 
|  | 29 | then | 
|  | 30 | eval "$COMMAND" | 
|  | 31 | fi |