forked from kiss-community/kiss
kiss: Use $pid instead of $$
This commit is contained in:
parent
ad5532671e
commit
5acaff9bdc
8
kiss
8
kiss
@ -293,7 +293,7 @@ pkg_extract() {
|
||||
|
||||
# Move the directory to prevent naming conflicts between
|
||||
# the child and parent
|
||||
mv -f "$dir" "$$-$dir"
|
||||
mv -f "$dir" "$pid-$dir"
|
||||
|
||||
# First attempt to move all files up a directory level,
|
||||
# if any files/directories fail (due to mv's lack of
|
||||
@ -307,17 +307,17 @@ pkg_extract() {
|
||||
# Using only '$@' causes a single file from each
|
||||
# invocation to be left out of the list. Weird, right?
|
||||
{
|
||||
find "$$-$dir/." ! -name . -prune \
|
||||
find "$pid-$dir/." ! -name . -prune \
|
||||
-exec sh -c 'mv -f "$0" "$@" .' {} + ||
|
||||
|
||||
find "$$-$dir/." ! -name . -prune \
|
||||
find "$pid-$dir/." ! -name . -prune \
|
||||
-exec sh -c 'cp -fRp "$0" "$@" .' {} +
|
||||
} 2>/dev/null
|
||||
|
||||
# Remove the directory now that all files have been
|
||||
# transferred out of it. This can't be a simple 'rmdir'
|
||||
# as we may leave files in here due to above.
|
||||
rm -rf "$$-$dir"
|
||||
rm -rf "$pid-$dir"
|
||||
done
|
||||
|
||||
# Clean up after ourselves and remove the temporary tar
|
||||
|
Loading…
Reference in New Issue
Block a user