File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Check if exactly one argument is passed
14if [ $# -ne 1 ]; then
2- echo " expected at least one argument" ;
3- exit 1;
5+ echo " Error: expected exactly one argument (path to 'secret.json')."
6+ exit 1
7+ fi
8+
9+ # Check if the 'secret.json' file exists
10+ if [ ! -f " $1 " ]; then
11+ echo " Error: 'secret.json' file not found at '$1 '."
12+ exit 1
413fi
514
6- echo " $1 " > " ./internal/excel/secret.json"
7- echo " $1 " > " ./internal/excel_adapter/internals/secret.json"
8- echo " $1 " > " ./pkg/excel/secret.json"
9- echo " $1 " > " ./pkg/excel_adapter/internals/secret.json"
15+ # Copy the 'secret.json' file to the specified directories
16+ cp " $1 " " ./internal/excel/secret.json" || { echo " Failed to copy to ./internal/excel/" ; exit 1; }
17+ cp " $1 " " ./internal/excel_adapter/internals/secret.json" || { echo " Failed to copy to ./internal/excel_adapter/internals/" ; exit 1; }
18+ cp " $1 " " ./pkg/excel/secret.json" || { echo " Failed to copy to ./pkg/excel/" ; exit 1; }
19+ cp " $1 " " ./pkg/excel_adapter/internals/secret.json" || { echo " Failed to copy to ./pkg/excel_adapter/internals/" ; exit 1; }
20+
21+ echo " 'secret.json' successfully copied to all specified directories."
You can’t perform that action at this time.
0 commit comments