mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
removes
This commit is contained in:
parent
99f47d7418
commit
70df0e89fe
2 changed files with 0 additions and 82 deletions
|
@ -1,48 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# mirrors.py file is part of slpkg.
|
|
||||||
|
|
||||||
# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
|
||||||
# All rights reserved.
|
|
||||||
|
|
||||||
# Utility for easy management packages in Slackware
|
|
||||||
|
|
||||||
# https://github.com/dslackw/slpkg
|
|
||||||
|
|
||||||
# Slpkg 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.
|
|
||||||
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from __metadata__ import arch
|
|
||||||
|
|
||||||
from slack_version import slack_ver
|
|
||||||
|
|
||||||
|
|
||||||
def mirrors(name, location, version):
|
|
||||||
'''
|
|
||||||
Select Slackware official mirror packages
|
|
||||||
based architecture and version.
|
|
||||||
'''
|
|
||||||
if arch == "x86_64":
|
|
||||||
if version == "stable":
|
|
||||||
http = ("http://mirrors.slackware.com/slackware/slackware64-"
|
|
||||||
"{0}/{1}{2}".format(slack_ver(), location, name))
|
|
||||||
else:
|
|
||||||
http = ("http://mirrors.slackware.com/slackware/slackware64-"
|
|
||||||
"{0}/{1}{2}".format(version, location, name))
|
|
||||||
else:
|
|
||||||
if version == "stable":
|
|
||||||
http = ("http://mirrors.slackware.com/slackware/slackware-"
|
|
||||||
"{0}/{1}{2}".format(slack_ver(), location, name))
|
|
||||||
else:
|
|
||||||
http = ("http://mirrors.slackware.com/slackware/slackware-"
|
|
||||||
"{0}/{1}{2}".format(version, location, name))
|
|
||||||
return http
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# slack_version.py file is part of slpkg.
|
|
||||||
|
|
||||||
# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
|
||||||
# All rights reserved.
|
|
||||||
|
|
||||||
# Utility for easy management packages in Slackware
|
|
||||||
|
|
||||||
# https://github.com/dslackw/slpkg
|
|
||||||
|
|
||||||
# Slpkg 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.
|
|
||||||
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def slack_ver():
|
|
||||||
'''
|
|
||||||
Open file and read Slackware version
|
|
||||||
'''
|
|
||||||
with open("/etc/slackware-version", "r") as f:
|
|
||||||
sv = f.read()
|
|
||||||
f.close()
|
|
||||||
return (".".join(re.findall(r"\d+", sv)))
|
|
Loading…
Reference in a new issue