<commit_before>#!/usr/local/bin/python

from os import listdir, path
from subprocess import Popen, PIPE, STDOUT, call
ustation_db = '/var/db/update-station/'

pkglockfile = '%slock-pkgs' % ustation_db
pkglist = '/var/db/pkg-update-check/pkg-update-list'
fbsduf = '/var/db/freebsd-update-check/'
pkgupdatefile = ustation_db + 'pkg-to-upgrade'
fbtag = '%stag' % fbsduf
fblist = '%stag' % fbsduf
fbvcmd = "freebsd-version"
fblist = '%stag' % fbsduf
checkpkgupgrade = 'sudo operator fbsdpkgupdate check'
fetchpkgupgrade = 'sudo operator pkg upgrade -Fy'
isntallpkgupgrade = 'sudo operator pkg upgrade -y'
lockpkg = 'sudo operator pkg lock -y '
unlockpkg = 'sudo operator pkg unlock -ay'
arch = Popen('uname -m', shell=True, stdin=PIPE, stdout=PIPE,
    stderr=STDOUT, close_fds=True).stdout.readlines()[0].rstrip()
release = Popen('uname -r', shell=True, stdin=PIPE, stdout=PIPE,
    stderr=STDOUT, close_fds=True).stdout.readlines()[0].rstrip()
if not path.isdir(ustation_db):
    Popen('sudo operator mkdir -p ' + ustation_db, shell=True, close_fds=True)
    Popen('sudo operator chmod -R 665 ' + ustation_db, shell=True, close_fds=True)
    Popen('sudo operator chown root:wheel ' + ustation_db, shell=True, close_fds=True)

fbsrcurl = "ftp://ftp.freebsd.org/pub/FreeBSD/releases/%s/%s/%s/src.txz" % (arch, arch, release)
fetchsrc = "sudo operator fetch %s" % fbsrcurl
extractsrc = "sudo operator tar Jxvf src.txz -C /"
fetchports = "sudo operator portsnap fetch"
extractports = "sudo operator portsnap extract"
updateports = "sudo operator portsnap update"
cleandesktop = "sudo operator sh /usr/local/lib/update-station/cleandesktop.sh"


def dowloadSrc():
    fetch = Popen('fetch %s' % fbsrcurl, shell=True, stdout=PIPE, close_fds=True)
    return fetch.stdout


def installSrc():
    extract = Popen(extractsrc, shell=True, stdout=PIPE, close_fds=True)
    return extract.stdout


def portsFetch():
    fetch = Popen(fetchports, shell=True, stdout=PIPE, close_fds=True)<commit_msg>changing the code look for pkg<commit_after>#!/usr/local/bin/python

from os import listdir, path
from subprocess import Popen, PIPE, STDOUT, call
ustation_db = '/var/db/update-station/'

pkglockfile = '%slock-pkgs' % ustation_db
pkglist = '/var/db/pkg-update-check/pkg-update-list'
fbsduf = '/var/db/freebsd-update-check/'
pkgupdatefile = ustation_db + 'pkg-to-upgrade'
fbtag = '%stag' % fbsduf
fblist = '%stag' % fbsduf
fbvcmd = "freebsd-version"
fblist = '%stag' % fbsduf
checkpkgupgrade = 'sudo operator fbsdpkgupdate check'
fetchpkgupgrade = 'sudo operator pkg upgrade -Fy'
isntallpkgupgrade = 'sudo operator pkg upgrade -y'
lockpkg = 'sudo operator pkg lock -y '
unlockallpkg = 'sudo operator pkg unlock -ay'
unlockpkg = 'sudo operator pkg unlock -y '
arch = Popen('uname -m', shell=True, stdin=PIPE, stdout=PIPE,
    stderr=STDOUT, close_fds=True).stdout.readlines()[0].rstrip()
release = Popen('uname -r', shell=True, stdin=PIPE, stdout=PIPE,
    stderr=STDOUT, close_fds=True).stdout.readlines()[0].rstrip()
if not path.isdir(ustation_db):
    Popen('sudo operator mkdir -p ' + ustation_db, shell=True, close_fds=True)
    Popen('sudo operator chmod -R 665 ' + ustation_db, shell=True, close_fds=True)
    Popen('sudo operator chown root:wheel ' + ustation_db, shell=True, close_fds=True)

fbsrcurl = "ftp://ftp.freebsd.org/pub/FreeBSD/releases/%s/%s/%s/src.txz" % (arch, arch, release)
fetchsrc = "sudo operator fetch %s" % fbsrcurl
extractsrc = "sudo operator tar Jxvf src.txz -C /"
fetchports = "sudo operator portsnap fetch"
extractports = "sudo operator portsnap extract"
updateports = "sudo operator portsnap update"
cleandesktop = "sudo operator sh /usr/local/lib/update-station/cleandesktop.sh"


def dowloadSrc():
    fetch = Popen('fetch %s' % fbsrcurl, shell=True, stdout=PIPE, close_fds=True)
    return fetch.stdout


def installSrc():
    extract = Popen(extractsrc, shell=True, stdout=PIPE, close_fds=True)
    return extract.stdout


def portsFetch():
    fetch = Popen(fetchports, shell=True, stdout=PIPE, close_fds=True)
{'fraction_non_alphanumeric': 0.13545026048127015, 'fraction_numerical': 0.0024807740014884646, 'mean_word_length': 5.026905829596412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2624235', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1461, 'n_words': 352}