def mount_tar(source, tarfile, destdir):
    '\n    source: str, directory of the tar files\n    template: str, template name for the tar file containing "{subd"\n    subd: int, index of the subdomain (0<=subd<=13)\n    destdir: str, directory where to archivemount\n\n    '
    srcfile = f'{source}/{tarfile}'
    assert os.path.isfile(srcfile), f'{srcfile} does not exsit'
    sqlitefile = get_sqlitefilename(srcfile)
    home = os.path.expanduser('~')
    ratardirsqlite = f'{home}/.ratarmount'
    if os.path.isfile(f'{ratardirsqlite}/{sqlitefile}'):
        pass
    elif os.path.isfile(f'{sqlitesdir}/{sqlitefile}'):
        command = f'cp {sqlitesdir}/{sqlitefile} {ratardirsqlite}/'
        os.system(command)
    assert (len(ratarmount) > 0), BB('You forgot to set the ratarmount path')
    command = f'{ratarmount} {srcfile} {destdir}'
    os.system(command)
    if os.path.isfile(f'{sqlitesdir}/{sqlitefile}'):
        pass
    else:
        command = f'cp {ratardirsqlite}/{sqlitefile} {sqlitesdir}/'
        os.system(command)
source: str, directory of the tar files
template: str, template name for the tar file containing "{subd"
subd: int, index of the subdomain (0<=subd<=13)
destdir: str, directory where to archivemount
def mount_tar(source, tarfile, destdir):
    '\n    source: str, directory of the tar files\n    template: str, template name for the tar file containing "{subd"\n    subd: int, index of the subdomain (0<=subd<=13)\n    destdir: str, directory where to archivemount\n\n    '
    srcfile = f'{source}/{tarfile}'
    assert os.path.isfile(srcfile), f'{srcfile} does not exsit'
    sqlitefile = get_sqlitefilename(srcfile)
    home = os.path.expanduser('~')
    ratardirsqlite = f'{home}/.ratarmount'
    if os.path.isfile(f'{ratardirsqlite}/{sqlitefile}'):
        pass
    elif os.path.isfile(f'{sqlitesdir}/{sqlitefile}'):
        command = f'cp {sqlitesdir}/{sqlitefile} {ratardirsqlite}/'
        os.system(command)
    assert (len(ratarmount) > 0), BB('You forgot to set the ratarmount path')
    command = f'{ratarmount} {srcfile} {destdir}'
    os.system(command)
    if os.path.isfile(f'{sqlitesdir}/{sqlitefile}'):
        pass
    else:
        command = f'cp {ratardirsqlite}/{sqlitefile} {sqlitesdir}/'
        os.system(command)