![]() |
FOSSology Advancing open source analysis and development |
|
cp2foss: load one or more files or archives into the Fossology DB.SYNOPSISGeneral: cp2foss [-h] {-p <folder-path> -n <folder-name> -a <path-to-archive> -d ``description'' | [-f <file-of-parameters>]} [-A] [-w] [-R] Form 1: cp2foss [-h] -p <folder-path> -n <folder-name> -a <path-to-archive> -d "description" [-A] Form 2: cp2foss [-h] -p <folder-path> -n <folder-name> -w -a <url> -d "description" [-A] Form 3: cp2foss [-h] -f <file-of-parameters>
DESCRIPTIONcp2foss (copy to foss) will load a single file or tar'ed archive into the folder specified by -n, under the folder-path specified with -p. The folder-path and folder-name do not need to exist. cp2foss will create them as needed. In the first form 1 archive is loaded into the Data Base. In the second form the optional -w parameter is used. When -w is used the argument to the -a option must be a valid URL. In this form cp2foss will first down-load the archive using the supplied url using the wget utility. After successful down-load, the down-loaded archive will be loaded into the Data Base using the folders specified. Use the third form if more than a single archive needs to be loaded. A file of input parameters can be supplied using the -f option. If the -f option is used, all other options on the command line are ignored. The file format is the same as the command line input. That is a set of switches followed by arguments. The character # in the 1st column is a comment. Blank lines are allowed and ignored. The fourth form is used to load files or whole directory trees from the server file system into the data-base. In the fourth form, the archive should point to a valid directory. If recursion is not on then only the files under the directory path will be uploaded. If recursion is on then everything under the directory path will be scheduled to be loaded into the data-base. NOTE: This form first makes a compressed tar archive of the directory tree. Make sure there is enough room in /tmp to hold the archive. Options
-p Mysrcs -n foo -a /tmp/mysrcs/foo.c -d "the foo program"
-p Mysrcs -n bar -a /tmp/mysrcs/bar.c -d "the bar program"
-p Othersrc -n randy /tmp/other/randy -d "somebodies randy program"
The above file would load 3 archives, foo.c, bar.c and randy. Folders Mysrcs and Othersrc would be created if they did not exist. folders for foo bar and randy would be placed under the parent folders. Mysrcs/foo, Mysrcs/bar, Othersrc/randy. EXAMPLEScp2foss -p Mom -n son -d "Sonny program, for cher" -a /pub/archive/sonny Would load the archive called sonny in the folder son under the folder path Mom. cp2foss -f /pub/lotsOarchives Would read the file /pub/lotsOarchives and process each line. If there were no errors, each archive specified in each line would be uploaded into the data-base. cp2foss -pUbuntu -n GGibon -w -a 'http://ubuntu.cs.utah.edu/releases/gutsy/ubuntu-7.10-desktop-i386.iso' -d 'Ubuntu Gutsy 7.10' The above example, cp2foss will first get the archive using the url and wget. It will then load the downloaded archive into the data-base. cp2foss -pFedora -n Fedora8 -R -a /bigdisk/fedora/ -d 'Fedora 8 Sources' This example loads every file under /bigdisk/fedora on the server into the data-base. AUTHORMark Donohoe for the Hewlett-Packard Company SEE ALSOwget FOSSology Project documentation is licensed under the GNU Free Documentation License Version 1.2 | |||