-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathportvars
More file actions
37 lines (28 loc) · 807 Bytes
/
portvars
File metadata and controls
37 lines (28 loc) · 807 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
34
35
#!/usr/bin/env bash
port_path=$1
##
## Colorise the text so it's easier too read
##
green=$(tput setaf 2)
cyan=$(tput setaf 6)
purple=$(tput setaf 5)
red=$(tput setaf 1)
normal=$(tput sgr0)
if [ -z ${port_path} ];then
echo "Please specify the port directory. e.g /usr/ports/ftp/curl"
exit 1
fi
if [ ! -d ${port_path} ]; then
echo "Can't find port"
exit 1
fi
Version=$(make -V PORTVERSION -f ${port_path}/Makefile)
echo "${green}#################################${normal}"
echo "Port Version : ${red}${Version}${normal}"
echo "${cyan}#################################${normal}"
for x in MAKE_ENV CONFIGURE_ENV MAKE_ARGS CONFIGURE_ARGS; do
echo "Variables defined in ${purple}${x}${normal}"
echo "${green}>>>${normal}"
make -V ${x} -f ${port_path}/Makefile
echo "${green}<<<${normal}"
done