#!/bin/sh -x

TEMP1=$(mktemp)
TEMP2=$(mktemp)

${BINARY} cli config devices ${myID} name set ${MYHOST}.${LOGNAME}

grep -v ${myID} ${SHARE_LIST} > ${TEMP1}

for i in `cat ${TEMP1}`
do
  echo $i
  ${BINARY} cli config devices add --device-id $i
done

 ${BINARY} cli config folders default delete

rm -f ${TEMP1} ${TEMP2}
