-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelper
executable file
·47 lines (38 loc) · 1.25 KB
/
helper
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
#!/usr/bin/env bash
MYDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
_watch() {
inotifywait -m vendor/streams/*/resources/public -r -e modify,create,moved_to |
while read path action file; do
echo "${action}: ${path}'"
php artisan vendor:publish --tag=public --force
done
}
_link(){
cd $MYDIR/vendor/streams
rm -rf core ui api
ln -s $MYDIR/packages/streams/core core
ln -s $MYDIR/packages/streams/ui ui
ln -s $MYDIR/packages/streams/api api
}
_clone(){
rm -rf $MYDIR/packages/streams/core
rm -rf $MYDIR/packages/streams/ui
rm -rf $MYDIR/packages/streams/api
git clone [email protected]:laravel-streams/streams-core $MYDIR/packages/streams/core
git clone [email protected]:laravel-streams/streams-ui $MYDIR/packages/streams/ui
git clone [email protected]:laravel-streams/streams-api $MYDIR/packages/streams/api
}
_switch-packages-feature(){
cd $MYDIR/packages/streams/core
git checkout feature/webpack-mix-root-based-bundling
cd $MYDIR/packages/streams/ui
git checkout feature/webpack-mix-root-based-bundling
cd $MYDIR/packages/streams/api
git checkout feature/webpack-mix-root-based-bundling
}
_bootstrap(){
_clone
_switch-packages-feature
_link
}
_$*