use --recursive on git submodule not --remote - one does a "latest update"
[soclayout.git] / mksym.sh
1 #!/bin/bash
2
3 ALLIANCE_TOOLKIT=${ALLIANCE_TOOLKIT:-${HOME}/alliance-check-toolkit/}
4 if [ ! -d ${ALLIANCE_TOOLKIT} ]; then
5 echo "alliance-check-toolkit not found; please set ALLIANCE_TOOLKIT"
6 exit 20
7 fi
8
9 echo "creating symlinks"
10
11 mkdir -p mk/dks.d
12 mkdir -p mk/users.d
13
14 declare -a ScriptsArray=("os" "users" "binaries" "alliance"
15 "design-flow" "pr-coriolis" "pr-alliance" "pr-hibikino"
16 "synthesis-yosys"
17 )
18
19 for script in "${ScriptsArray[@]}"; do
20 if [ ! -L "mk/$script.mk" ]; then
21 echo "link" mk/$script.mk
22 ln -s $ALLIANCE_TOOLKIT/etc/mk/$script.mk mk/$script.mk
23 fi
24 done
25
26 declare -a LibsArray=("sxlib" "nsxlib" "nsxlib45" "cmos" "cmos45" "mosis"
27 )
28
29 for script in "${LibsArray[@]}"; do
30 if [ ! -L "mk/dks.d/$script.mk" ]; then
31 echo "link" mk/dks.d/$script.mk
32 ln -s $ALLIANCE_TOOLKIT/etc/mk/dks.d/$script.mk mk/dks.d/$script.mk
33 fi
34 done
35
36 declare -a UsersArray=("lkcl"
37 )
38
39 for script in "${UsersArray[@]}"; do
40 if [ ! -L "mk/users.d/user-$script.mk" ]; then
41 echo "link" mk/users.d/user-$script.mk
42 ln -s $ALLIANCE_TOOLKIT/etc/mk/users.d/user-$script.mk \
43 mk/users.d/user-$script.mk
44 fi
45 done
46