#!/bin/sh

VENDOR="Samsung"
MODEL="Samsung CLX-6260 Series"
MANAGERPATH="/Library/Application Support/$VENDOR/Scan Manager"
VENDORPATH="/Library/Application Support/$VENDOR"

rm -r "$MANAGERPATH/$MODEL"

folderNum=0
echo $folderNum
folderNum=$(expr $(ls "$MANAGERPATH" | wc -l))
echo $folderNum

if [ $folderNum == 0 ]
then
   rm -r "$MANAGERPATH"
else
   echo "FALSE"
fi


folderNum=$(expr $(ls "$VENDORPATH" | wc -l))
echo $folderNum

if [ $folderNum == 0 ]
then
   rm -r "$VENDORPATH"
else
   echo "FALSE"
fi