# Path: neubot/utils_path.py
# def depth_visit(prefix, components, visit):
# def decode(string, encoding):
# def encode(string, encoding):
# def possibly_decode(string, encoding):
# def append(rootdir, path, unquote_path):
# def normalize(string):
# def join(left, right):
# def main(args):
# STRING_CLASS = six.u("").__class__


import compileall
import getopt
import os
import re
import sys
import tarfile
from neubot import utils_path
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Neubot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Neubot.  If not, see <http://www.gnu.org/licenses/>.
#

''' Install a new version of Neubot '''


if __name__ == '__main__':
    sys.path.insert(0, '.')


def __verify(basedir, member):
    ''' Verify one member of the tarfile '''

    #
    # Make sure that the combination of basedir and member
    # name falls below basedir.
    #

# Path: neubot/utils_path.py
# def depth_visit(prefix, components, visit):
# def decode(string, encoding):
# def encode(string, encoding):
# def possibly_decode(string, encoding):
# def append(rootdir, path, unquote_path):
# def normalize(string):
# def join(left, right):
# def main(args):
# STRING_CLASS = six.u("").__class__


# Path: neubot/updater_install.py
import compileall
import getopt
import os
import re
import sys
import tarfile
from neubot import utils_path

# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Neubot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Neubot.  If not, see <http://www.gnu.org/licenses/>.
#

''' Install a new version of Neubot '''


if __name__ == '__main__':
    sys.path.insert(0, '.')


def __verify(basedir, member):
    ''' Verify one member of the tarfile '''

    #
    # Make sure that the combination of basedir and member
    # name falls below basedir.
    #

    result = utils_path.append(basedir, member.name, False)