forked from kiss-community/kiss
kiss: Actually hide an error + whitespace cleanup
This commit is contained in:
parent
c8b5990acf
commit
7e3f208199
24
kiss
24
kiss
@ -205,7 +205,7 @@ pkg_sources() {
|
||||
# Git has no option to clone a repository to a
|
||||
# specific location so we must do it ourselves
|
||||
# beforehand.
|
||||
cd "$mak_dir/$1/$dest" || die 2>/dev/null
|
||||
cd "$mak_dir/$1/$dest" 2>/dev/null
|
||||
|
||||
# Clear the argument list as we'll be overwriting
|
||||
# it below based on what kind of checkout we're
|
||||
@ -432,11 +432,11 @@ pkg_fixdeps() {
|
||||
# first column.
|
||||
sort -uk1,1 -o depends depends 2>/dev/null ||:
|
||||
|
||||
# Display a 'diff' of the new dependencies against the old ones.
|
||||
# Display a 'diff' of the new dependencies against the old ones.
|
||||
diff -U 3 "$dep_file" depends ||:
|
||||
|
||||
# Remove the package's depends file if it's empty.
|
||||
[ -s depends ] || rm -f depends
|
||||
[ -s depends ] || rm -f depends
|
||||
}
|
||||
|
||||
pkg_manifest() (
|
||||
@ -824,7 +824,7 @@ pkg_install_files() {
|
||||
# skipping anything located in /etc/.
|
||||
#
|
||||
# The 'test' will run with '-e' for no-overwrite and '-z'
|
||||
# for overwrite.
|
||||
# for overwrite.
|
||||
case $line in /etc/*) ;;
|
||||
*/) [ -d "$line" ] ||
|
||||
install -o root -g root -m "$rwx" \
|
||||
@ -832,10 +832,10 @@ pkg_install_files() {
|
||||
|
||||
*) test "$1" "$KISS_ROOT/$line" ||
|
||||
|
||||
if [ -L "$2/$line" ]; then
|
||||
if [ -L "$2/$line" ]; then
|
||||
[ -d "$KISS_ROOT/$line" ] && continue
|
||||
|
||||
cp -fPp "$2/$line" "${line%/*}"
|
||||
cp -fPp "$2/$line" "${line%/*}"
|
||||
chown -h root:root "$KISS_ROOT/$line"
|
||||
else
|
||||
install -o root -g root -m "$rwx" \
|
||||
@ -1005,9 +1005,9 @@ pkg_install() {
|
||||
# each file and directory inside of it actually exists.
|
||||
[ "$KISS_FORCE" = 1 ] || {
|
||||
log "$pkg_name" "Checking that manifest is valid"
|
||||
while read -r line; do
|
||||
while read -r line; do
|
||||
[ -L "$tar_dir/$pkg_name/$line" ] ||
|
||||
[ -e "$tar_dir/$pkg_name/$line" ] ||
|
||||
[ -e "$tar_dir/$pkg_name/$line" ] ||
|
||||
die "File $line missing from tarball but mentioned in manifest"
|
||||
done < "$tar_dir/$pkg_name/$pkg_db/$pkg_name/manifest"
|
||||
|
||||
@ -1234,7 +1234,7 @@ pkg_clean() {
|
||||
# files and directories.
|
||||
set +f -- "$mak_dir" "$pkg_dir" "$tar_dir" "$cac_dir/$pid-m"
|
||||
|
||||
# Go through the cache and add any entries which don't belong
|
||||
# Go through the cache and add any entries which don't belong
|
||||
# to a currently running kiss instance.
|
||||
for dir in "$cac_dir/"[bep]*-[0-9]*; do
|
||||
[ -e "/proc/${dir##*-}" ] || set -- "$@" "$dir"
|
||||
@ -1291,7 +1291,7 @@ args() {
|
||||
|
||||
# Second early check to use $PWD in place of arguments.
|
||||
[ "$1" ] || case $action in b|build|c|checksum|i|install|r|remove)
|
||||
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
||||
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
||||
set -- "${PWD##*/}"
|
||||
esac
|
||||
|
||||
@ -1381,10 +1381,10 @@ args() {
|
||||
for path do
|
||||
printf '\033[31;1m->\033[m %-*s ' "$max" "${path#*/kiss-}"
|
||||
sed -n 's/^# *//;2p' "$(command -v "kiss-$path")"
|
||||
done | sort -uk1 >&2
|
||||
done | sort -uk1 >&2
|
||||
;;
|
||||
|
||||
*)
|
||||
*)
|
||||
util=$(KISS_PATH=$PATH pkg_find "kiss-$action*" 2>/dev/null) ||
|
||||
die "'kiss $action' is not a valid command"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user