mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-13 12:55:08 -05:00
Fix misspellings and some grammar issues in output of some pacman contrib scripts
Affected files: -- contrib/bacman.sh.in -- contrib/paccache.sh.in -- contrib/pacdiff.sh.in -- contrib/rankmirrors.sh.in Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
ae2c9bba5a
commit
9749fb033c
@ -210,8 +210,8 @@ while read i; do
|
|||||||
# Workaround to bsdtar not reporting a missing file as an error
|
# Workaround to bsdtar not reporting a missing file as an error
|
||||||
if ! [[ -e $package_file || -L $package_file ]]; then
|
if ! [[ -e $package_file || -L $package_file ]]; then
|
||||||
error "unable to add $local_file to the package"
|
error "unable to add $local_file to the package"
|
||||||
plain " If your user does not have permission to read this file then"
|
plain " If your user does not have permission to read this file, then"
|
||||||
plain " you will need to run $myname as root"
|
plain " you will need to run $myname as root."
|
||||||
rm -rf "$work_dir"
|
rm -rf "$work_dir"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -147,7 +147,7 @@ summarize() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf '\n' >&2
|
printf '\n' >&2
|
||||||
msg "$output (diskspace saved: %s)" "$(size_to_human "$totalsaved")"
|
msg "$output (disk space saved: %s)" "$(size_to_human "$totalsaved")"
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@ -269,7 +269,7 @@ esac
|
|||||||
die "cachedir '%s' does not exist or is not a directory" "$cachedir"
|
die "cachedir '%s' does not exist or is not a directory" "$cachedir"
|
||||||
|
|
||||||
[[ $movedir && ! -d $movedir ]] &&
|
[[ $movedir && ! -d $movedir ]] &&
|
||||||
die "move-to directory '%s' does not exist or is not a directory" "$movedir"
|
die "destination directory '%s' does not exist or is not a directory" "$movedir"
|
||||||
|
|
||||||
if (( move || delete )); then
|
if (( move || delete )); then
|
||||||
# make it an absolute path since we're about to chdir
|
# make it an absolute path since we're about to chdir
|
||||||
|
@ -39,7 +39,7 @@ A simple program to merge or remove pacnew/pacorig/pacsave files.
|
|||||||
|
|
||||||
Usage: $myname [-l | -f | -p] [--nocolor]
|
Usage: $myname [-l | -f | -p] [--nocolor]
|
||||||
|
|
||||||
Search Options: select one, default: pacmandb
|
Search Options: select one (default: --pacmandb)
|
||||||
-l/--locate scan using locate
|
-l/--locate scan using locate
|
||||||
-f/--find scan using find
|
-f/--find scan using find
|
||||||
-p/--pacmandb scan active config files from pacman database
|
-p/--pacmandb scan active config files from pacman database
|
||||||
@ -138,7 +138,7 @@ if (( USE_PACDB )); then
|
|||||||
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
eval $(awk '/DBPath/ {print $1$2$3}' @sysconfdir@/pacman.conf)
|
||||||
pac_db="${DBPath:-@localstatedir@/lib/pacman/}local"
|
pac_db="${DBPath:-@localstatedir@/lib/pacman/}local"
|
||||||
if [[ ! -d "${pac_db}" ]]; then
|
if [[ ! -d "${pac_db}" ]]; then
|
||||||
error "unable to read pacman db %s". "${pac_db}"
|
error "unable to read pacman database %s". "${pac_db}"
|
||||||
usage; exit 1
|
usage; exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -130,8 +130,15 @@ while [[ $1 ]]; do
|
|||||||
version) version ;;
|
version) version ;;
|
||||||
times) TIMESONLY=1 ; shift ;;
|
times) TIMESONLY=1 ; shift ;;
|
||||||
verbose) VERBOSE=1 ; shift ;;
|
verbose) VERBOSE=1 ; shift ;;
|
||||||
url) CHECKURL=1; [[ $2 ]] || err "Must specify url."; URL="$2"; shift 2;;
|
url)
|
||||||
repo) [[ $2 ]] || err "Must specify repo name."; TARGETREPO="$2"; shift 2;;
|
CHECKURL=1;
|
||||||
|
[[ $2 ]] || err "Must specify URL.";
|
||||||
|
URL="$2";
|
||||||
|
shift 2;;
|
||||||
|
repo)
|
||||||
|
[[ $2 ]] || err "Must specify repository name.";
|
||||||
|
TARGETREPO="$2";
|
||||||
|
shift 2;;
|
||||||
*) err "'$1' is an invalid argument."
|
*) err "'$1' is an invalid argument."
|
||||||
esac
|
esac
|
||||||
elif [[ ${1:0:1} = - ]]; then
|
elif [[ ${1:0:1} = - ]]; then
|
||||||
@ -148,9 +155,19 @@ while [[ $1 ]]; do
|
|||||||
h) usage ;;
|
h) usage ;;
|
||||||
t) TIMESONLY=1 ;;
|
t) TIMESONLY=1 ;;
|
||||||
v) VERBOSE=1 ;;
|
v) VERBOSE=1 ;;
|
||||||
u) CHECKURL=1; [[ $2 ]] || err "Must specify url."; URL="$2"; snum=2;;
|
u)
|
||||||
r) [[ $2 ]] || err "Must specify repo name."; TARGETREPO="$2"; snum=2;;
|
CHECKURL=1;
|
||||||
n) [[ $2 ]] || err "Must specify number." ; NUM="$2" ; snum=2;;
|
[[ $2 ]] || err "Must specify URL.";
|
||||||
|
URL="$2";
|
||||||
|
snum=2;;
|
||||||
|
r)
|
||||||
|
[[ $2 ]] || err "Must specify repository name.";
|
||||||
|
TARGETREPO="$2";
|
||||||
|
snum=2;;
|
||||||
|
n)
|
||||||
|
[[ $2 ]] || err "Must specify number.";
|
||||||
|
NUM="$2";
|
||||||
|
snum=2;;
|
||||||
*) err "'$1' is an invalid argument." ;;
|
*) err "'$1' is an invalid argument." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -168,22 +185,22 @@ done
|
|||||||
|
|
||||||
# Some sanity checks
|
# Some sanity checks
|
||||||
[[ $NUM ]] || NUM=0
|
[[ $NUM ]] || NUM=0
|
||||||
[[ $FILE && $CHECKURL ]] && err "Cannot specify a url and mirrorfile."
|
[[ $FILE && $CHECKURL ]] && err "Cannot specify a URL and mirrorfile."
|
||||||
[[ $FILE || $CHECKURL || $STDIN ]] || err "Must specify url, mirrorfile, or stdin."
|
[[ $FILE || $CHECKURL || $STDIN ]] || err "Must specify URL, mirrorfile, or stdin."
|
||||||
|
|
||||||
# Single url handling
|
# Single URL handling
|
||||||
if [[ $CHECKURL ]]; then
|
if [[ $CHECKURL ]]; then
|
||||||
url="$(getfetchurl "$URL")"
|
url="$(getfetchurl "$URL")"
|
||||||
[[ $url = fail ]] && err "url '$URL' is malformed."
|
[[ $url = fail ]] && err "URL '$URL' is malformed."
|
||||||
[[ $VERBOSE ]] && echo "Testing $url..."
|
[[ $VERBOSE ]] && echo "Testing $url..."
|
||||||
time=$(gettime "$url")
|
time=$(gettime "$url")
|
||||||
echo "$URL : $time"
|
echo "$URL : $time"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get url results from mirrorfile, fill up the array, and so on
|
# Get URL results from mirrorfile, fill up the array, and so on
|
||||||
if [[ $TIMESONLY ]]; then
|
if [[ $TIMESONLY ]]; then
|
||||||
echo "Querying servers, this may take some time..."
|
echo "Querying servers. This may take some time..."
|
||||||
elif [[ $FILE ]]; then
|
elif [[ $FILE ]]; then
|
||||||
echo "# Server list generated by rankmirrors on $(date +%Y-%m-%d)"
|
echo "# Server list generated by rankmirrors on $(date +%Y-%m-%d)"
|
||||||
fi
|
fi
|
||||||
@ -198,7 +215,7 @@ for line in "${linearray[@]}"; do
|
|||||||
server="${line#*= }"
|
server="${line#*= }"
|
||||||
server="${server%%#*}"
|
server="${server%%#*}"
|
||||||
url="$(getfetchurl "$server")"
|
url="$(getfetchurl "$server")"
|
||||||
[[ $url = fail ]] && err "url '$URL' is malformed."
|
[[ $url = fail ]] && err "URL '$URL' is malformed."
|
||||||
time=$(gettime "$url")
|
time=$(gettime "$url")
|
||||||
timesarray+=("$time $server")
|
timesarray+=("$time $server")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user