|
|
|
@ -31,6 +31,7 @@ usage() { |
|
|
|
|
echo " -n: Dryrun; Output commands, but don't do anything." |
|
|
|
|
echo " -d: Show debug info." |
|
|
|
|
echo " -u: Perform an update in the clean chroot." |
|
|
|
|
echo " -U: Update the file sums in conf.sh." |
|
|
|
|
echo " -C: Remove all files that are not package sources." |
|
|
|
|
echo |
|
|
|
|
echo "Modes:" |
|
|
|
@ -262,6 +263,8 @@ for (( a = 0; a < $#; a++ )); do |
|
|
|
|
commands+=("cleanup") |
|
|
|
|
elif [[ ${args[$a]} == "-u" ]]; then |
|
|
|
|
commands+=("update_chroot") |
|
|
|
|
elif [[ ${args[$a]} == "-U" ]]; then |
|
|
|
|
commands+=("update_sums") |
|
|
|
|
elif [[ ${args[$a]} == "-n" ]]; then |
|
|
|
|
dry_run=1 |
|
|
|
|
elif [[ ${args[$a]} == "-d" ]]; then |
|
|
|
@ -295,6 +298,22 @@ fi |
|
|
|
|
msg "$(date) :: ${script_name} started..." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if have_command "update_sums"; then |
|
|
|
|
# Only the files in the zfs-utils package will be updated |
|
|
|
|
run_cmd_show_and_capture_output "sha256sum ${script_dir}/src/zfs-utils/zfs-utils.bash-completion-r1" |
|
|
|
|
azsha1=$(echo ${run_cmd_output} | awk '{ print $1 }') |
|
|
|
|
run_cmd "sed -e 's/^zfs_bash_completion_hash.*/zfs_bash_completion_hash=\"${azsha1}\"/g' -i ${script_dir}/conf.sh" |
|
|
|
|
|
|
|
|
|
run_cmd_show_and_capture_output "sha256sum ${script_dir}/src/zfs-utils/zfs-utils.initcpio.hook" |
|
|
|
|
azsha2=$(echo ${run_cmd_output} | awk '{ print $1 }') |
|
|
|
|
run_cmd "sed -e 's/^zfs_initcpio_hook_hash.*/zfs_initcpio_hook_hash=\"${azsha1}\"/g' -i ${script_dir}/conf.sh" |
|
|
|
|
|
|
|
|
|
run_cmd_show_and_capture_output "sha256sum ${script_dir}/src/zfs-utils/zfs-utils.initcpio.install" |
|
|
|
|
azsha3=$(echo ${run_cmd_output} | awk '{ print $1 }') |
|
|
|
|
run_cmd "sed -e 's/^zfs_initcpio_install_hash.*/zfs_initcpio_install_hash=\"${azsha1}\"/g' -i ${script_dir}/conf.sh" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if have_command "update_chroot"; then |
|
|
|
|
msg "Updating the x86_64 clean chroot..." |
|
|
|
|
run_cmd "sudo ~/bin/ccm64 u" |
|
|
|
|