Skip to content
Snippets Groups Projects
Commit fce34301 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

More test to avoid errors when env is not complete.

parent 1f3f6cc7
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,15 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
{
print "Error: Missing environment variables.\n";
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
}
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
{
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
......@@ -391,6 +400,7 @@ if ($nboftargetok) {
if ($target eq 'TGZ')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
print "Remove target $FILENAMETGZ.tgz...\n";
......@@ -417,6 +427,7 @@ if ($nboftargetok) {
if ($target eq 'XZ')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
print "Remove target $FILENAMEXZ.xz...\n";
......@@ -447,6 +458,7 @@ if ($nboftargetok) {
if ($target eq 'ZIP')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
print "Remove target $FILENAMEZIP.zip...\n";
......@@ -481,6 +493,7 @@ if ($nboftargetok) {
if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; }
if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; }
if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; }
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
$ARCH='noarch';
......@@ -577,6 +590,7 @@ if ($nboftargetok) {
if ($target eq 'DEB')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/package_debian-ubuntu');
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
$olddir=getcwd();
......@@ -731,6 +745,7 @@ if ($nboftargetok) {
if ($target eq 'APS')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/package_aps');
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
$newbuild = $BUILD;
......@@ -815,6 +830,7 @@ if ($nboftargetok) {
if ($target eq 'EXEDOLIWAMP')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment