Browse Source

Merge branch 'master' of bcornec/mageia4arm into master

DTux 1 year ago
parent
commit
3c3922f99a
1 changed files with 14 additions and 15 deletions
  1. 14 15
      create_arm_img_urpmi.sh

+ 14 - 15
create_arm_img_urpmi.sh

@@ -68,7 +68,7 @@ function help()
68 68
 	echo "--build-path			Path to the build directory of the image of Mageia $MAGEIA_VERSION"
69 69
 	echo "--target 				target system (for now rpi, odroid)"
70 70
 	echo "--target-version      version of the target (0, 1, 2, 3 for rpi, 3 or 4 for odroid)"
71
-	echo "--config				Path to config files"
71
+	echo "--config				Path to config files (rpi1  rpi2  rpi3  rpi3+  xu4)"
72 72
 	echo "--bootfs              filesystem of boot partition (ext4 or vfat) default: ext4"
73 73
 	echo "--nonfree				activate nonfree repos"
74 74
 	echo "--tainted				activate tainted repos"
@@ -780,9 +780,11 @@ do
780 780
 		;;
781 781
 	--nonfree)
782 782
 		NONFREE_P=1
783
+		shift
783 784
 		;;
784 785
 	--tainted)
785 786
 		TAINTED_P=1
787
+		shift
786 788
 		;;
787 789
 	--)
788 790
       shift
@@ -806,25 +808,22 @@ if ! [ -d "$CONFIG_PATH" ];then
806 808
         warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
807 809
         exit 2
808 810
     else
809
-        error( "Error: Can't continue without config file, exiting" )
811
+        error "Error: Can't continue without config file, exiting"
810 812
         exit 3            
811 813
     fi
812 814
 fi
813 815
 
814
-	if [ -e "$CONFIG_PATH/mageia4arm.cfg" ];then
815
-		info "using $CONFIG_PATH/mageia4arm.cfg as config"
816
-		. "$CONFIG_PATH/mageia4arm.cfg"
817
-	else
818
-		warning "Config file does not exists, do you want i copy template ? [Y|n] "
819
-		read yn
820
-		if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
821
-			/usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$CONFIG_PATH/mageia4arm.cfg"
822
-			warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
823
-			exit 2
824
-		fi
825
-	fi
816
+if [ -e "$CONFIG_PATH/mageia4arm.cfg" ];then
817
+	info "using $CONFIG_PATH/mageia4arm.cfg as config"
818
+	. "$CONFIG_PATH/mageia4arm.cfg"
826 819
 else
827
-	
820
+	warning "Config file does not exists, do you want i copy template ? [Y|n] "
821
+	read yn
822
+	if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
823
+		/usr/bin/cp --preserve=mode "$SOURCE_PATH/mageia4arm.cfg.template" "$CONFIG_PATH/mageia4arm.cfg"
824
+		warning "You need now to modify the config file ($CONFIG_PATH/mageia4arm.cfg) and relaunch the script"
825
+		exit 2
826
+	fi
828 827
 fi
829 828
 
830 829
 if ! [ -z "$IMAGE_SIZE_P" ];then