Browse Source

variable rename

The MMGen Project 2 months ago
parent
commit
51fe0d499f
1 changed files with 9 additions and 7 deletions
  1. 9 7
      scripts/armbian_rootenc_setup.sh

+ 9 - 7
scripts/armbian_rootenc_setup.sh

@@ -1053,18 +1053,20 @@ _kernels_match() {
 copy_etc_files_distro_specific() {
 copy_etc_files_distro_specific() {
 	local files='/etc/apt/sources.list /etc/apt/sources.list.d/armbian.list'
 	local files='/etc/apt/sources.list /etc/apt/sources.list.d/armbian.list'
 	if _distros_match; then
 	if _distros_match; then
-		for i in $files; do _copy_to_target $i; done
+		for f in $files; do
+			_copy_to_target $f
+		done
 	else
 	else
 		warn 'Warning: host and target distros do not match, attempting to rewrite files:'
 		warn 'Warning: host and target distros do not match, attempting to rewrite files:'
-		for i in $files; do
-			imsg "  rewriting $i"
-			if [ "$target_armbian_keyring_signed" -a $(basename $i) == 'armbian.list' ]; then
+		for f in $files; do
+			imsg "  rewriting $f"
+			if [ "$target_armbian_keyring_signed" -a $(basename $f) == 'armbian.list' ]; then
 				repl='deb [signed-by=\/usr\/share\/keyrings\/armbian.gpg] http'
 				repl='deb [signed-by=\/usr\/share\/keyrings\/armbian.gpg] http'
-				sed "s/$host_distro/$target_distro/g;s/deb http/$repl/" <$i >$TARGET_ROOT/$i
+				sed "s/$host_distro/$target_distro/g;s/deb http/$repl/" <$f >$TARGET_ROOT/$f
 			else
 			else
-				sed "s/$host_distro/$target_distro/g" <$i >$TARGET_ROOT/$i
+				sed "s/$host_distro/$target_distro/g" <$f >$TARGET_ROOT/$f
 			fi
 			fi
-			_display_file $TARGET_ROOT$i
+			_display_file $TARGET_ROOT$f
 		done
 		done
 	fi
 	fi
 }
 }