forked from kiss-community/kiss
Merge pull request #138 from clifordsab/kiss-fix-cd
kiss: Actually hide an error + whitespace cleanup
This commit is contained in:
commit
965b66d8fb
18
kiss
18
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" \
|
||||
@ -835,7 +835,7 @@ pkg_install_files() {
|
||||
if [ -h "$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" \
|
||||
@ -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