SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Arguments are currently the list of ids and the id to start from
  2.  
  3. archivelist=$1
  4. startFrom=$2
  5. maxObjects=50
  6.  
  7. echo "Getting cookies"
  8. curl -X POST -F "UserName=$login" -F "Password=$password" --dump-header somecookies $host/Account/Login
  9.  
  10. num=0
  11. lastObject=0
  12.  
  13. while read archiveId;
  14. do
  15.     if [ -z $startFrom ] || [ $startFrom -eq $archiveId ]
  16.     then
  17.         startFrom=""
  18.     else
  19.         echo "Cobtinbue"
  20.         continue
  21.     fi
  22.    
  23.     echo "Starting transform for $archiveId"
  24.     lastObject=$archiveId
  25.     curl -X POST -F "id=$archiveId" --cookie somecookies $host/MediaObjects/StartTransform
  26.     num=`expr $num + 1`
  27.     if [ $num -ge $maxObjects ]
  28.     then
  29.         break
  30.     fi
  31. done < "$archivelist"
  32.  
  33. echo "Finished on $lastObject"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top