Skip to content

Commit

Permalink
Merge pull request #63 from nesi/dini-dev
Browse files Browse the repository at this point in the history
add setup.sh
  • Loading branch information
DininduSenanayake authored Oct 4, 2024
2 parents b64e2fb + f3c8996 commit 3bcb195
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Color codes
YELLOW='\033[1;33m'
GREEN='\033[1;32m'
NC='\033[0m' # No Color
BOLD='\033[1m'

# Ask for the working directory
echo -e "${YELLOW}Provide the path to working directory for apsim_simulations:${NC} \c"
read -r working_dir

# Check if the directory exists, if not create it
if [ ! -d "$working_dir" ]; then
mkdir -p "$working_dir"
echo "Created directory: $working_dir"
fi

# Copy the R script
cp 03-generate-config-files/generate_apsim_configs.R "$working_dir"

# Copy the Snakefile_txt
cp 08-snakemake/Snakefile_txt "$working_dir"

# Copy the Snakefile_apsimx
cp 08-snakemake/Snakefile_apsimx "$working_dir"

# Print completion message
echo -e "\nSetup is complete. Switching to working directory now."

# Change to the working directory
cd "$working_dir" || exit

# Print current directory to confirm
echo -e "${GREEN}${BOLD}Current working directory: $(pwd)${NC}"

0 comments on commit 3bcb195

Please sign in to comment.