summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm56
1 files changed, 2 insertions, 54 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 7b9b4b13..a804632f 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -20,6 +20,7 @@ use strict;
use Carp;
use File::Basename;
use OpenSLX::Basics;
+use OpenSLX::Utils;
use vars qw(%supportedDistros);
@@ -75,7 +76,7 @@ sub initialize
{
my $self = shift;
my $distroName = shift;
- my $selectionName = shift;
+ my $selectionName = shift || 'default';
my $protectSystemPath = shift;
my $cloneMode = shift;
@@ -714,59 +715,6 @@ sub clone_fetchSource
################################################################################
### utility functions
################################################################################
-sub copyFile
-{
- my $fileName = shift;
- my $dirName = shift;
-
- my $baseName = basename($fileName);
- my $targetName = "$dirName/$baseName";
- if (!-e $targetName) {
- my $targetDir = dirname($targetName);
- system("mkdir -p $targetDir") unless -d $targetDir;
- if (system("cp -p $fileName $targetDir/")) {
- die _tr("unable to copy file '%s' to dir '%s' (%s)",
- $fileName, $targetDir, $!);
- }
- }
-}
-
-sub fakeFile
-{
- my $fullPath = shift;
-
- my $targetDir = dirname($fullPath);
- system("mkdir", "-p", $targetDir) unless -d $targetDir;
- if (system("touch", $fullPath)) {
- die _tr("unable to create file '%s' (%s)",
- $fullPath, $!);
- }
-}
-
-sub linkFile
-{
- my $linkTarget = shift;
- my $linkName = shift;
-
- my $targetDir = dirname($linkName);
- system("mkdir -p $targetDir") unless -d $targetDir;
- if (system("ln -s $linkTarget $linkName")) {
- die _tr("unable to create link '%s' to '%s' (%s)",
- $linkName, $linkTarget, $!);
- }
-}
-
-sub slurpFile
-{
- my $file = shift;
- open(F, "< $file")
- or die _tr("could not open file '%s' for reading! (%s)", $file, $!);
- $/ = undef;
- my $text = <F>;
- close(F);
- return $text;
-}
-
sub string2Array
{
my $str = shift;