1if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1
2#
3# Copyright (c) 2013 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
--- 10 unchanged lines hidden (view full) ---
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/share/packages/packages.subr 270283 2014-08-21 17:15:09Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." "$0"
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/device.subr
--- 988 unchanged lines hidden (view full) ---
1024 f_show_info "$msg_adding_package_as_a_dependency_from_media" \
1025 "$name" "$devname"
1026 else
1027 f_show_info "$msg_adding_package_from_media" "$name" "$devname"
1028 fi
1029
1030 # Request the package be added via pkg-install(8)
1031 if f_debugging; then
1032 f_eval_catch $funcname pkg \
1033 'pkg -d install -${depended:+A}y "%s"' "$name"
1034 else
1035 f_eval_catch $funcname pkg \
1036 'pkg install -${depended:+A}y "%s"' "$name"
1037 fi
1038 if [ $? -ne $SUCCESS ]; then
1039 $alert "$msg_pkg_install_apparently_did_not_like_the_package" \
1040 "$name"
1041 [ "$no_confirm" ] && sleep 2
1042 else
1043 f_show_info "$msg_package_was_added_successfully" "$name"
1044 sleep 1
--- 148 unchanged lines hidden ---
2#
3# Copyright (c) 2013 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
--- 10 unchanged lines hidden (view full) ---
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/share/packages/packages.subr 270283 2014-08-21 17:15:09Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." "$0"
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/device.subr
--- 988 unchanged lines hidden (view full) ---
1024 f_show_info "$msg_adding_package_as_a_dependency_from_media" \
1025 "$name" "$devname"
1026 else
1027 f_show_info "$msg_adding_package_from_media" "$name" "$devname"
1028 fi
1029
1030 # Request the package be added via pkg-install(8)
1031 if f_debugging; then
1032 f_eval_catch $funcname pkg \
1033 'pkg -d install -${depended:+A}y "%s"' "$name"
1034 else
1035 f_eval_catch $funcname pkg \
1036 'pkg install -${depended:+A}y "%s"' "$name"
1037 fi
1038 if [ $? -ne $SUCCESS ]; then
1039 $alert "$msg_pkg_install_apparently_did_not_like_the_package" \
1040 "$name"
1041 [ "$no_confirm" ] && sleep 2
1042 else
1043 f_show_info "$msg_package_was_added_successfully" "$name"
1044 sleep 1
--- 148 unchanged lines hidden ---