-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·33 lines (27 loc) · 851 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·33 lines (27 loc) · 851 Bytes
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
#
# Commando setup action.
#
function __setup {
local releasedir="$1"
local projectdir="$2"
local verbose_options=''
if ${verbose}; then
verbose_options='-v'
fi
# install bootstrap
cp ${verbose_options} "$releasedir/commando.sh" "$projectdir"
chmod ${verbose_options} +x "$projectdir/commando.sh"
# prepare configuration
if [ ! -d "$projectdir/.commando" ]; then
mkdir "$projectdir/.commando"
fi
if [ ! -d "$projectdir/.commando/library" ]; then
mkdir "$projectdir/.commando/library"
fi
# install default library modules
cp ${verbose_options} -r "$releasedir/.commando/library" "$projectdir/.commando"
# maybe install default config.sh module
if [ ! -e "$projectdir/.commando/config.sh" ]; then
cp ${verbose_options} -r "$releasedir/.commando/config.sh" "$projectdir/.commando/config.sh"
fi
}