update_meta: naive implementation of put 05/29505/1
authorEd Bartosh <eduard.bartosh@intel.com>
Tue, 28 Oct 2014 13:45:56 +0000 (15:45 +0200)
committerEd Bartosh <eduard.bartosh@intel.com>
Tue, 28 Oct 2014 13:50:21 +0000 (15:50 +0200)
Implemented simple syncing local meta to OBS:
./update_meta.sh put <project>

Change-Id: Icdd2199ec6c3fc403ad7ff40988f0d19ac497dd9
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
update_meta.sh

index 33341bc..ad9fd54 100755 (executable)
@@ -82,4 +82,13 @@ if [ "$ACTION" == 'get' ] ; then
        done
 
        parallel_jobs 1
+elif [ "$ACTION" == 'put' ] ; then
+       find . -type f | while read path; do
+               path=$(echo $path|cut -d/ -f2-)
+               echo Sending $path to $PRJ
+               osc -A $API api -X PUT /source/$PRJ/$path -f $path
+       done
+else
+       >&2 echo "Error: Unknown action: $ACTION"
+       exit 1
 fi