+shift $(( OPTIND - 1 ))
+
+if [ -n "$rootdir" ]; then
+ : rootdir=${rootdir%%/}
+ ZPM_ROOT_DIR=$rootdir
+ export ZPM_ROOT_DIR
+fi
+
+if [ -n "$localdb" ]; then
+ ZPMDB=$localdb
+elif [ -z "$ZPMDB" ]; then
+ ZPMDB="$ZPM_ROOT_DIR/var/lib/zpm/local.db"
+fi