FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
cp2foss.php File Reference

cp2foss Import a file (or director or url) into FOSSology for processing. 0 for success, 1 for failure. More...

Go to the source code of this file.

Functions

 GetBucketFolder ($UploadName, $BucketGroupSize)
 Given an upload name and the number of letters per bucket, return the bucket folder name.
 
 GetFolder ($FolderPath, $Parent=null)
 Given a folder path, return the folder_pk. More...
 
 UploadOne ($FolderPath, $UploadArchive, $UploadName, $UploadDescription, $TarSource=null)
 Given one object (file or URL), upload it. More...
 

Variables

global $Plugins
 
 $Usage
 
global $PG_CONN
 
 $Verbose = 0
 
 $Test = 0
 
 $fossjobs_command = ""
 
 $FolderPath = "/"
 
 $UploadDescription = ""
 
 $UploadName = ""
 
 $QueueList = ""
 
 $TarExcludeList = ""
 
 $bucket_size = 3
 
 $public_flag = 0
 
 $scmarg = NULL
 
 $OptionS = ""
 
 $user = $passwd = ""
 
 $group = ""
 
 $vcsuser = $vcspass= ""
 
if(!$Test &&$OptionQ) if($stdin_flag) if($Verboseelse
 
if(!$UploadArchive) $UploadArchiveTmp = ""
 
if(strlen($UploadArchive) > 0 &&empty($UploadName)) if($vcsuser &&$vcspass) print Loading n
 
print Calling UploadOne in
 
 $res = UploadOne($FolderPath, $UploadArchive, $UploadName, $UploadDescription)
 

Detailed Description

cp2foss Import a file (or director or url) into FOSSology for processing. 0 for success, 1 for failure.

Definition in file cp2foss.php.

Function Documentation

GetFolder (   $FolderPath,
  $Parent = null 
)

Given a folder path, return the folder_pk.

Parameters
$FolderPath- path from -f
$Parent- parent folder of $FolderPath
Returns
folder_pk, 1: 'Software Repository', others: specified folder
Note
If any part of the folder path does not exist, thenscp cp2foss will create it. This is recursive!

Definition at line 160 of file cp2foss.php.

UploadOne (   $FolderPath,
  $UploadArchive,
  $UploadName,
  $UploadDescription,
  $TarSource = null 
)

Given one object (file or URL), upload it.

Parameters
$FolderPath- folder path
$UploadArchive- upload file(absolute path) or url
$UploadName- uploaded file/dir name
$UploadDescription- upload description
Returns
1: error, 0: success

list all available processing agents

Definition at line 219 of file cp2foss.php.

Variable Documentation

$UploadArchiveTmp = ""

get real path, and file name

Definition at line 563 of file cp2foss.php.

if (!$UploadArchiveTmp) else
Initial value:
{
$fossjobs_command = "fossjobs --username $user --groupname $group --password $passwd -c $SYSCONFDIR "

list all available processing agents get archive from stdin compose fossjobs command

Definition at line 551 of file cp2foss.php.