File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/components/Generator/GeneredTaskfile/addons Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
- function app:ensure {
2
- if [ ! $( which " $1 " ) ]; then
1
+ function app:ensure { # Abort if the desired program is not installed
2
+ if [ ! $( which " $1 " ) ]; then
3
3
echo " Missing required application ${RED} $1 ${RESET} . Install it before tying again."
4
4
exit 1
5
- fi
5
+ else
6
+ echo " Application ${GREEN} $1 ${RESET} is installed." ;
7
+ fi
6
8
}
Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ function file:ensure { # Abort if the desired file is not found
2
2
if [ ! -f $1 ]; then
3
3
echo -e " Missing required file ${RED} $1 ${RESET} , make sure it is created."
4
4
exit 1
5
+ else
6
+ echo " File ${GREEN} $1 ${RESET} is present." ;
5
7
fi
6
8
}
7
9
8
- function file:ensure-copy { # file:ensure-copy $COPY_TARGET $COPY_SOURCE
9
- if [ ! -f $1 ]; then
10
+ function file:ensure-copy { # file:ensure-copy $COPY_DESTINATION $SOURCE
11
+ if [ ! -f $1 ]; then
10
12
cp $2 $1 ;
11
13
echo -e " Created copy of ${YELLOW} $2 ${RESET} to create required file ${GREEN} $1 ${RESET} ." ;
12
14
else
13
15
echo " File ${GREEN} $1 ${RESET} is present." ;
14
- fi
16
+ fi
15
17
}
You can’t perform that action at this time.
0 commit comments