View | Details | Raw Unified | Return to bug 119001
Collapse All | Expand All

(-)/usr/home/spear/downloads/bpkg-1.7.1/Makefile (-2 / +2 lines)
Lines 2-14 Link Here
2
# Date created:				24 June 2007
2
# Date created:				24 June 2007
3
# Whom:					Andy Kosela <andy.kosela@gmail.com>
3
# Whom:					Andy Kosela <andy.kosela@gmail.com>
4
#
4
#
5
# $FreeBSD: ports/ports-mgmt/bpkg/Makefile,v 1.10 2007/12/12 23:48:51 miwi Exp $
5
# $FreeBSD$
6
#
6
#
7
# This port is self contained in the files directory.
7
# This port is self contained in the files directory.
8
#
8
#
9
9
10
PORTNAME=	bpkg
10
PORTNAME=	bpkg
11
PORTVERSION=	1.7
11
PORTVERSION=	1.7.1
12
CATEGORIES=	ports-mgmt
12
CATEGORIES=	ports-mgmt
13
MASTER_SITES=	# none
13
MASTER_SITES=	# none
14
DISTFILES=	# none
14
DISTFILES=	# none
(-)/usr/home/spear/downloads/bpkg-1.7.1/files/bpkg.8 (-2 / +2 lines)
Lines 23-29 Link Here
23
.\" SUCH DAMAGE.
23
.\" SUCH DAMAGE.
24
.\"
24
.\"
25
.\"
25
.\"
26
.Dd November 14, 2007
26
.Dd December 24, 2007
27
.Dt BPKG 8
27
.Dt BPKG 8
28
.Os
28
.Os
29
.Sh NAME
29
.Sh NAME
Lines 62-68 Link Here
62
.It Fl b
62
.It Fl b
63
upgrade/install the specified ports, update the list of installed ports in /root/ports.lst.
63
upgrade/install the specified ports, update the list of installed ports in /root/ports.lst.
64
.It Fl B
64
.It Fl B
65
create backup package file in /usr/tmp/ from a locally installed package.
65
create backup package file in /usr/obj/ from a locally installed package.
66
.It Fl c
66
.It Fl c
67
clean all distfiles in /usr/ports/distfiles/* [no arguments]
67
clean all distfiles in /usr/ports/distfiles/* [no arguments]
68
.It Fl C
68
.It Fl C
(-)/usr/home/spear/downloads/bpkg-1.7.1/files/bpkg.sh.in (-34 / +24 lines)
Lines 1-5 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD: ports/ports-mgmt/bpkg/files/bpkg.sh.in,v 1.9 2007/12/12 23:48:52 miwi Exp $
2
# $FreeBSD$
3
3
4
#  Copyright (c) 2007 Andy Kosela <andy.kosela@gmail.com>
4
#  Copyright (c) 2007 Andy Kosela <andy.kosela@gmail.com>
5
#  All rights reserved.
5
#  All rights reserved.
Lines 75-82 Link Here
75
				n) ;;
75
				n) ;;
76
				*) 
76
				*) 
77
				if [ ! -z "$e_installed" ]; then
77
				if [ ! -z "$e_installed" ]; then
78
					echo -n "Creating backup package in /usr/tmp/$e_installed.tbz... "
78
					echo -n "Creating backup package in /usr/obj/$e_installed.tbz... "
79
					cd /usr/tmp/ && pkg_create -b $e_installed
79
					cd /usr/obj/ && pkg_create -b $e_installed
80
					echo "Done."
80
					echo "Done."
81
				fi
81
				fi
82
82
Lines 84-89 Link Here
84
84
85
				echo ""
85
				echo ""
86
				if [ ! -z "$e_installed" ]; then
86
				if [ ! -z "$e_installed" ]; then
87
					touch /root/ports.lst
87
					if [ ! -z "`grep $e /root/ports.lst`" ]; then
88
					if [ ! -z "`grep $e /root/ports.lst`" ]; then
88
						echo "It seems you installed this package using ports."
89
						echo "It seems you installed this package using ports."
89
						echo "It is strongly recommended to upgrade it using also ports."
90
						echo "It is strongly recommended to upgrade it using also ports."
Lines 92-98 Link Here
92
						case $key in
93
						case $key in
93
							n) 
94
							n) 
94
							sed -i '' s,$e,,g /root/ports.lst 1>/dev/null 2>&1;;
95
							sed -i '' s,$e,,g /root/ports.lst 1>/dev/null 2>&1;;
95
							*) exit 0;;
96
							*) ;;
96
						esac
97
						esac
97
					fi
98
					fi
98
99
Lines 100-113 Link Here
100
					pkg_delete -f $e_installed 1>/dev/null 2>&1
101
					pkg_delete -f $e_installed 1>/dev/null 2>&1
101
					if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
102
					if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
102
						echo "*** cannot proceed without first removing the package ***"
103
						echo "*** cannot proceed without first removing the package ***"
103
						exit 0
104
					fi
104
					fi
105
					pkg_add -r $e_stripped
105
					pkg_add -r $e_stripped
106
					exit 0
107
				else
106
				else
108
					echo "Installing new package:"
107
					echo "Installing new package:"
109
					pkg_add -r $e_stripped
108
					pkg_add -r $e_stripped
110
					exit 0
111
				fi;;
109
				fi;;
112
			esac
110
			esac
113
		done
111
		done
Lines 146-153 Link Here
146
				setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/
144
				setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/
147
145
148
				if [ ! -z "$e_installed" ]; then
146
				if [ ! -z "$e_installed" ]; then
149
					echo -n "Creating backup package in /usr/tmp/$e_installed.tbz... "
147
					echo -n "Creating backup package in /usr/obj/$e_installed.tbz... "
150
					cd /usr/tmp/ && pkg_create -b $e_installed
148
					cd /usr/obj/ && pkg_create -b $e_installed
151
					echo "Done."
149
					echo "Done."
152
				fi
150
				fi
153
151
Lines 155-160 Link Here
155
153
156
				echo ""
154
				echo ""
157
				if [ ! -z "$e_installed" ]; then
155
				if [ ! -z "$e_installed" ]; then
156
					touch /root/ports.lst
158
					if [ ! -z "`grep $e /root/ports.lst`" ]; then
157
					if [ ! -z "`grep $e /root/ports.lst`" ]; then
159
						echo "It seems you installed this package using ports."
158
						echo "It seems you installed this package using ports."
160
						echo "It is strongly recommended to upgrade it using also ports."
159
						echo "It is strongly recommended to upgrade it using also ports."
Lines 164-171 Link Here
164
							n) 
163
							n) 
165
							sed -i '' s,$e,,g /root/ports.lst 1>/dev/null 2>&1;;
164
							sed -i '' s,$e,,g /root/ports.lst 1>/dev/null 2>&1;;
166
							*)
165
							*)
167
							unsetenv PACKAGESITE
166
							unsetenv PACKAGESITE;;
168
							exit 0;;
169
						esac
167
						esac
170
					fi
168
					fi
171
169
Lines 173-188 Link Here
173
					pkg_delete -f $e_installed 1>/dev/null 2>&1
171
					pkg_delete -f $e_installed 1>/dev/null 2>&1
174
					if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
172
					if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
175
						echo "*** cannot proceed without first removing the package ***"
173
						echo "*** cannot proceed without first removing the package ***"
176
						exit 0
177
					fi
174
					fi
178
					pkg_add -r $e_stripped
175
					pkg_add -r $e_stripped
179
					unsetenv PACKAGESITE
176
					unsetenv PACKAGESITE
180
					exit 0
181
				else
177
				else
182
					echo "Installing new package:"
178
					echo "Installing new package:"
183
					pkg_add -r $e_stripped
179
					pkg_add -r $e_stripped
184
					unsetenv PACKAGESITE
180
					unsetenv PACKAGESITE
185
					exit 0
186
				fi;;
181
				fi;;
187
			esac
182
			esac
188
		done
183
		done
Lines 218-225 Link Here
218
				n) ;;
213
				n) ;;
219
				*) 
214
				*) 
220
				if [ ! -z "$e_installed" ]; then
215
				if [ ! -z "$e_installed" ]; then
221
					echo -n "Creating backup package in /usr/tmp/$e_installed.tbz... "
216
					echo -n "Creating backup package in /usr/obj/$e_installed.tbz... "
222
					cd /usr/tmp/ && pkg_create -b $e_installed
217
					cd /usr/obj/ && pkg_create -b $e_installed
223
					echo "Done."
218
					echo "Done."
224
				fi
219
				fi
225
220
Lines 230-240 Link Here
230
					echo "Upgrading installed package:"
225
					echo "Upgrading installed package:"
231
					pkg_delete -n $e_installed 1>/dev/null 2>&1
226
					pkg_delete -n $e_installed 1>/dev/null 2>&1
232
					pkg_add -rn $e_stripped
227
					pkg_add -rn $e_stripped
233
					exit 0
234
				else
228
				else
235
					echo "Installing new package:"
229
					echo "Installing new package:"
236
					pkg_add -rn $e_stripped
230
					pkg_add -rn $e_stripped
237
					exit 0
238
				fi;;
231
				fi;;
239
			esac
232
			esac
240
		done
233
		done
Lines 270-277 Link Here
270
				n) ;;
263
				n) ;;
271
				*)
264
				*)
272
				if [ ! -z "$e_installed" ]; then
265
				if [ ! -z "$e_installed" ]; then
273
					echo -n "Creating backup package in /usr/tmp/$e_installed.tbz... "
266
					echo -n "Creating backup package in /usr/obj/$e_installed.tbz... "
274
					cd /usr/tmp/ && pkg_create -b $e_installed
267
					cd /usr/obj/ && pkg_create -b $e_installed
275
					echo "Done."
268
					echo "Done."
276
				fi
269
				fi
277
270
Lines 280-293 Link Here
280
				echo ""
273
				echo ""
281
				if [ ! -z "$e_installed" ]; then
274
				if [ ! -z "$e_installed" ]; then
282
					echo "Upgrading installed port:"
275
					echo "Upgrading installed port:"
276
					touch /root/ports.lst
283
					[ -z "`grep $e /root/ports.lst`" ] && echo $e >> /root/ports.lst
277
					[ -z "`grep $e /root/ports.lst`" ] && echo $e >> /root/ports.lst
284
					pkg_delete -f $e_installed 1>/dev/null 2>&1
278
					pkg_delete -f $e_installed 1>/dev/null 2>&1
285
					if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
279
					if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
286
						echo "*** cannot proceed without first removing the package ***"
280
						echo "*** cannot proceed without first removing the package ***"
287
						exit 0
288
					fi
281
					fi
289
				else
282
				else
290
					echo "Installing new port:"
283
					echo "Installing new port:"
284
					touch /root/ports.lst
291
					echo $e >> /root/ports.lst
285
					echo $e >> /root/ports.lst
292
				fi
286
				fi
293
287
Lines 298-315 Link Here
298
					read key
292
					read key
299
					case $key in
293
					case $key in
300
						y) cd /usr/ports/$e && make config-recursive
294
						y) cd /usr/ports/$e && make config-recursive
301
						cd /usr/ports/$e && make install clean
295
						cd /usr/ports/$e && make install clean;;
302
						exit 0;;
303
						*) cd /usr/ports/$e && make config
296
						*) cd /usr/ports/$e && make config
304
						cd /usr/ports/$e && make install clean
297
						cd /usr/ports/$e && make install clean;;
305
						exit 0;;
306
					esac;;
298
					esac;;
307
299
308
					*) cd /usr/ports/$e && make install clean
300
					*) cd /usr/ports/$e && make install clean;;
309
					exit 0;;
301
				esac;;
310
				esac
311
	   			exit 0;;
312
313
			esac
302
			esac
314
		done
303
		done
315
	done
304
	done
Lines 650-655 Link Here
650
639
651
	echo -e "\033[33m*** installed ***\033[0m"
640
	echo -e "\033[33m*** installed ***\033[0m"
652
	pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
641
	pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
642
	touch /root/ports.lst
653
	for e in $pkg; do 
643
	for e in $pkg; do 
654
		sed -i '' s,.*$e,,g /root/ports.lst 1>/dev/null 2>&1
644
		sed -i '' s,.*$e,,g /root/ports.lst 1>/dev/null 2>&1
655
	done
645
	done
Lines 710-718 Link Here
710
	fi
700
	fi
711
701
712
	pkg_install=`pkg_info -xoQ $pkg | cut -d: -f1 | awk '{ORS=" " ; print}'`
702
	pkg_install=`pkg_info -xoQ $pkg | cut -d: -f1 | awk '{ORS=" " ; print}'`
713
	echo "Creating backup package(s) "$pkg_install"in /usr/tmp/"
703
	echo "Creating backup package(s) "$pkg_install"in /usr/obj/"
714
	for e in `pkg_info -xoq $pkg`; do
704
	for e in `pkg_info -xoq $pkg`; do
715
		cd /usr/tmp/ && pkg_create -xb $e
705
		cd /usr/obj/ && pkg_create -xb $e
716
	done
706
	done
717
	echo "Done."
707
	echo "Done."
718
	exit 0
708
	exit 0
Lines 865-872 Link Here
865
				n) ;;
855
				n) ;;
866
				*) 
856
				*) 
867
				if [ ! -z "$e_installed" ]; then
857
				if [ ! -z "$e_installed" ]; then
868
					echo -n "Creating backup package in /usr/tmp/$e_installed.tbz... "
858
					echo -n "Creating backup package in /usr/obj/$e_installed.tbz... "
869
					cd /usr/tmp/ && pkg_create -b $e_installed
859
					cd /usr/obj/ && pkg_create -b $e_installed
870
					echo "Done."
860
					echo "Done."
871
				fi
861
				fi

Return to bug 119001