Skip to content

Commit

Permalink
Add backup source
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Dec 5, 2021
1 parent 1819275 commit eaf6715
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ copy_files() {
diff_release_name="$(cat ${tag_rootfs}/etc/armbian-release | grep -oE "^DISTRIBUTION_CODENAME=.*" | awk -F "=" '{print $2}')"
diff_release_files="${configfiles_path}/release/${diff_release_name}"
if [[ -n "${diff_release_name}" && -d "${diff_release_files}" ]]; then
# Backup source
mv -f ${tag_rootfs}/etc/apt/sources.list ${tag_rootfs}/etc/apt/sources.list.bak
mv -f ${tag_rootfs}/etc/apt/sources.list.d/armbian.list ${tag_rootfs}/etc/apt/sources.list.d/armbian.list.bak
# Copy custom source
cp -rf ${diff_release_files}/* ${tag_rootfs} && sync
fi
#
Expand Down

0 comments on commit eaf6715

Please sign in to comment.