Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make all answers y*|Y* #86

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions scripts/abk
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ remove_old_pkgs() {
ask "Remove packages ? [y/N] [ default: --dry-run ] : "; read -r ans; echo

case "$ans" in
y|Y) eval paccache -rvk${keep} -c "$pkgdir" "$target" ;;
y*|Y*) eval paccache -rvk${keep} -c "$pkgdir" "$target" ;;
*) eval paccache -dvk${keep} -c "$pkgdir" "$target" ;;
esac
else
Expand Down Expand Up @@ -487,9 +487,9 @@ build_kernel() {
esac

case "$ans" in
y|Y) BUILDDIR=$MAKEPKG_DIR makepkg -sf -L
makepkg_retval=$? ;;
*) error "NOT forcing overwrite: ending build."; die $MAKEPKG_DIR ;;
y*|Y*) BUILDDIR=$MAKEPKG_DIR makepkg -sf -L
makepkg_retval=$? ;;
*) error "NOT forcing overwrite: ending build."; die $MAKEPKG_DIR ;;
esac
;;

Expand Down Expand Up @@ -558,16 +558,16 @@ clean_dir() {
esac

case "$ans" in
y|Y) msg "Cleaning up: $dir..."
rsync -a --delete "$tmp"/ "$dir"/
rmdir "$tmp" "$dir"
;;
*) if [ "$clean_type" = "build" ]; then
error "Cannot build without cleaning: $dir"; die
else
warning "Not cleaning: $dir"
fi
;;
y*|Y*) msg "Cleaning up: $dir..."
rsync -a --delete "$tmp"/ "$dir"/
rmdir "$tmp" "$dir"
;;
*) if [ "$clean_type" = "build" ]; then
error "Cannot build without cleaning: $dir"; die
else
warning "Not cleaning: $dir"
fi
;;
esac
else
error "Directory does not exist: $dir"
Expand Down Expand Up @@ -639,7 +639,7 @@ clean_sources() {
fi

case "$ans" in
y|Y) dir_list=$(find "$src_dir" -mindepth 1 -maxdepth 1 -type d)
y*|Y*) dir_list=$(find "$src_dir" -mindepth 1 -maxdepth 1 -type d)

# selectively clean directories
for dir in $dir_list; do
Expand All @@ -654,7 +654,7 @@ clean_sources() {
rm -f "$file"
done
;;
*) warning "Not cleaning sources: $src_dir" ;;
*) warning "Not cleaning sources: $src_dir" ;;
esac
}

Expand Down
Loading