eac123's picture
Upload folder using huggingface_hub (part 7)
98ac88a verified
Raw History Blame Contribute Delete
180 Bytes
#!/bin/sh
UP=
DN=${PWD:?}
TP=${TOPDIR:?}
while [ ! $TP/$UP/. -ef $DN ] ;do
UP=`basename $PWD`/$UP
cd ..
if [ "$PWD" = "/" ]; then echo "Lost"; exit 1; fi
done
echo $UP
exit 0