annotate create_mapping.sh @ 0:7a7ba86e95a4 draft default tip

"planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
author climate
date Tue, 15 Jun 2021 09:39:23 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
1 #!/usr/bin/env bash
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
2
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
3 echo "=========================================="
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
4 echo " Create symbolic link for input data "
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
5 echo "=========================================="
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
6
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
7 echo "Search for $2..."
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
8
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
9 create_link=$(grep $2 $3)
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
10 dir=$(dirname $create_link)
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
11
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
12 echo "mkdir -p inputdata/$dir"
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
13 mkdir -p inputdata/$dir
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
14
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
15 echo "ln -s $1 inputdata/$create_link"
7a7ba86e95a4 "planemo upload for repository https://github.com/ESCOMP/CESM commit 5c969e494841237de0b2301520d9321672cc9f5b"
climate
parents:
diff changeset
16 ln -s $1 inputdata/$create_link