-
Notifications
You must be signed in to change notification settings - Fork 22
/
link.sh
executable file
·42 lines (41 loc) · 1.08 KB
/
link.sh
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
#!/bin/bash
mkdir -p _allclientdirectives
mkdir -p _allcontrollers
mkdir -p _allmodels
mkdir -p _allpolicies
mkdir -p _allroutes
rm _allclientdirectives/*
rm _allcontrollers/*
rm _allmodels/*
rm _allpolicies/*
rm _allroutes/*
for DIRECTORY in $(find modules -name "directives"); do
if [[ $DIRECTORY == */client/directives ]]; then
echo $DIRECTORY
ln -s $PWD/${DIRECTORY}/*.js _allclientdirectives/
fi
done;
for DIRECTORY in $(find modules -name "controllers"); do
if [[ $DIRECTORY == */server/controllers ]]; then
echo $DIRECTORY
ln -s $PWD/${DIRECTORY}/*.js _allcontrollers/
fi
done;
for DIRECTORY in $(find modules -name "models"); do
if [[ $DIRECTORY == */server/models ]]; then
echo $DIRECTORY
ln -s $PWD/${DIRECTORY}/*.js _allmodels/
fi
done;
for DIRECTORY in $(find modules -name "policies"); do
if [[ $DIRECTORY == */server/policies ]]; then
echo $DIRECTORY
ln -s $PWD/${DIRECTORY}/*.js _allpolicies/
fi
done;
for DIRECTORY in $(find modules -name "routes"); do
if [[ $DIRECTORY == */server/routes ]]; then
echo $DIRECTORY
ln -s $PWD/${DIRECTORY}/*.js _allroutes/
fi
done;