mirror of
https://codeberg.org/kiss-community/kiss
synced 2025-01-11 21:30:06 -07:00
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
|
# Move the directory to prevent naming conflicts between
|
||||||
# the child and parent
|
# the child and parent
|
||||||
mv -f "$dir" "$$-$dir"
|
mv -f "$dir" "$pid-$dir"
|
||||||
|
|
||||||
# First attempt to move all files up a directory level,
|
# First attempt to move all files up a directory level,
|
||||||
# if any files/directories fail (due to mv's lack of
|
# 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
|
# Using only '$@' causes a single file from each
|
||||||
# invocation to be left out of the list. Weird, right?
|
# 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" "$@" .' {} + ||
|
-exec sh -c 'mv -f "$0" "$@" .' {} + ||
|
||||||
|
|
||||||
find "$$-$dir/." ! -name . -prune \
|
find "$pid-$dir/." ! -name . -prune \
|
||||||
-exec sh -c 'cp -fRp "$0" "$@" .' {} +
|
-exec sh -c 'cp -fRp "$0" "$@" .' {} +
|
||||||
} 2>/dev/null
|
} 2>/dev/null
|
||||||
|
|
||||||
# Remove the directory now that all files have been
|
# Remove the directory now that all files have been
|
||||||
# transferred out of it. This can't be a simple 'rmdir'
|
# transferred out of it. This can't be a simple 'rmdir'
|
||||||
# as we may leave files in here due to above.
|
# as we may leave files in here due to above.
|
||||||
rm -rf "$$-$dir"
|
rm -rf "$pid-$dir"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Clean up after ourselves and remove the temporary tar
|
# Clean up after ourselves and remove the temporary tar
|
||||||
|
Loading…
Reference in New Issue
Block a user