Skip to content

Commit

Permalink
Adds bash script to copy the files from alp's environment. (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominichofer authored Jul 13, 2023
1 parent 5c54ccd commit 3e8c3b0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sysconfigs/copy_alps_env_files_from.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Intended use: ./sysconfigs/copy_alps_env_files_from.sh /mch-environment/v8

parent_dir=$( cd "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" ; pwd -P )

if [[ "$#" == 1 ]]; then
env_path="$1"
machine="$( "$parent_dir"/../src/machine.sh )"
else
echo "Requires path to environment as argument!"
exit 0
fi

# Copy files
cp "$env_path"/config/compilers.yaml "$parent_dir/$machine"
cp "$env_path"/config/upstreams.yaml "$parent_dir/$machine"
cp -r "$env_path"/repo/* "$parent_dir"/../repos/alps

# Display success message
echo "Files copied successfully."

0 comments on commit 3e8c3b0

Please sign in to comment.