[PC-BSD Commits] r13993 - in pcbsd/current/src-sh/pbi-manager: . man1
svn at pcbsd.org
svn at pcbsd.org
Thu Nov 17 09:44:32 PST 2011
Author: kris
Date: 2011-11-17 09:44:32 -0800 (Thu, 17 Nov 2011)
New Revision: 13993
Modified:
pcbsd/current/src-sh/pbi-manager/man1/pbi_add.1
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Add new -R feature to pbi_add, which allows users to fetch a PBI from the mirror without installing
it and save it to the current directory.
Modified: pcbsd/current/src-sh/pbi-manager/man1/pbi_add.1
===================================================================
--- pcbsd/current/src-sh/pbi-manager/man1/pbi_add.1 2011-11-17 15:31:50 UTC (rev 13992)
+++ pcbsd/current/src-sh/pbi-manager/man1/pbi_add.1 2011-11-17 17:44:32 UTC (rev 13993)
@@ -12,6 +12,7 @@
.Op Fl i
.Op Fl l
.Op Fl r
+.Op Fl R
.Op Fl v
.Op Fl -checkscript
.Op Fl -licagree
@@ -54,8 +55,11 @@
.It Fl o Ar outdir
Specify the directory to use when only extracting the PBI with -e.
.It Fl r
-Remote fetch the installation file from the update server. The system architecture
+Fetch and install the PBI file from the update server. The system architecture
and version will be automatically determined to fetch the correct file.
+.It Fl R
+Fetch the install file from the update server, do not install. The system architecture
+and version will be automatically determined to fetch the correct file.
.It Fl v
Enable verbose output
.It Fl -checkscript
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-11-17 15:31:50 UTC (rev 13992)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-11-17 17:44:32 UTC (rev 13993)
@@ -35,7 +35,8 @@
-i -- Display information about this PBI
-l -- Display LICENSE text
-o outdir -- Extract to target directory
- -r -- Remote fetch installation file from update server
+ -r -- Fetch and install PBI
+ -R -- Fetch install file and save to disk (Do not install)
-v -- Enable verbose output
--checkscript -- Display any custom install / removal scripts
--licagree -- Agree to LICENSE terms for installation
@@ -865,6 +866,9 @@
;;
-r) PBI_REMOTEFETCH="YES"
;;
+ -R) PBI_REMOTEFETCH="YES"
+ PBI_REMOTEFETCHONLY="YES"
+ ;;
-v) PBI_VERBOSE="YES"
;;
--rArch)
@@ -1307,6 +1311,7 @@
PBI_PATCHVERSION=""
PBI_PATCHTARGET=""
PBI_REMOTEFETCH=""
+ PBI_REMOTEFETCHONLY=""
PBI_RESOURCE_DIR="resources"
PBI_SS_ICON="__PBI_ICON__"
PBI_SS_ARCHIVE="__PBI_ARCHIVE__"
@@ -5003,6 +5008,13 @@
# Now overwrite the PBI_FILENAME and let us proceed to regular install
PBI_FILENAME="$PBI_UPDLFILE"
+ # If we are only fetching, finish up now
+ if [ "$PBI_REMOTEFETCHONLY" = "YES" ] ; then
+ mv $PBI_FILENAME ./`basename ${PBI_UPFILE}`
+ echo "PBI saved to ./`basename ${PBI_UPFILE}`"
+ exit_trap
+ fi
+
}
# Update the targed PBI
More information about the Commits
mailing list