Skip to content

Commit

Permalink
Fix staging file/dir from commandline (not file-list)
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Oct 23, 2024
1 parent 809d813 commit 32c057b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ada/ada
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ get_locality () {
bulk_request() {
local activity="$1"
local path="$2"
local pathlist="$2"
local recursive="$3"
if [ "$from_file" == false ] ; then
get_locality "$pathlist"
Expand All @@ -888,7 +888,7 @@ bulk_request() {
echo 1>&2 "Error: '$pathlist' does not exist."
exit 1
fi
type=$(pathtype "$path")
type=$(pathtype "$pathlist")
case $type in
DIR )
if $recursive ; then
Expand All @@ -901,7 +901,7 @@ bulk_request() {
expand=NONE
;;
'' )
echo "Warning: could not determine object type of '$path'."
echo "Warning: could not determine object type of '$pathlist'."
;;
* )
echo "Unknown object type '$type'. Please create an issue for this in Github."
Expand All @@ -914,18 +914,18 @@ bulk_request() {
else
expand=TARGETS
fi
target='['
while read -r path ; do
target=$target\"/${path}\",
done <<<"$pathlist"
target=${target%?}]
fi
case $activity in
PIN )
arguments="{\"lifetime\": \"${lifetime}\", \"lifetimeUnit\":\"${lifetime_unit}\"}" ;;
UNPIN )
arguments="{}" ;;
esac
target='['
while read -r path ; do
target=$target\"/${path}\",
done <<<"$pathlist"
target=${target%?}]
data="{\"activity\": \"${activity}\", \"arguments\": ${arguments}, \"target\": ${target}, \"expand_directories\": \"${expand}\"}"
$debug || echo "$target "
(
Expand Down

0 comments on commit 32c057b

Please sign in to comment.