-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto.sh
More file actions
executable file
·51 lines (44 loc) · 1.23 KB
/
Copy pathauto.sh
File metadata and controls
executable file
·51 lines (44 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Initialize variables
current_dir=$(dirname "$0")
source "$current_dir/cluster_helpers.sh"
workspace_path="/scratch/snormanh_lab/shared/Sigurd/encodingmodel"
cluster="bluehive3"
args=()
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--path)
workspace_path="$2"
shift 2
;;
-a|--cluster)
if [[ -z "$2" || "$2" == -* ]]; then
echo "Error: $1 requires a cluster name" >&2
exit 1
fi
cluster="$2"
require_cluster "$cluster" || exit 1
args+=("-a" "$cluster")
shift 2
;;
--cluster=*)
cluster="${1#*=}"
require_cluster "$cluster" || exit 1
args+=("-a" "$cluster")
shift
;;
*)
args+=("$1")
shift
;;
esac
done
require_cluster "$cluster" || exit 1
compute_host="$(cluster_compute_host "$cluster")" || exit 1
# Execute cisc.sh
source "$current_dir/cisc.sh"
# Execute remote_sshd.sh with filtered arguments
"$current_dir/remote_sshd.sh" "${args[@]}"
# Open VSCode with the specified workspace
code -n --remote "ssh-remote+$compute_host" "$workspace_path"