forked from semios/semios-packages
Compare commits
1
Commits
source_git
..
mksh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a2fa464c6 |
@@ -59,7 +59,3 @@ def block_hook(hook: str):
|
|||||||
|
|
||||||
def source_url(url: str):
|
def source_url(url: str):
|
||||||
sources.source_url(url)
|
sources.source_url(url)
|
||||||
|
|
||||||
|
|
||||||
def source_git(url: str, branch: str | None = None):
|
|
||||||
sources.source_git(url, branch)
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
import tarfile
|
import tarfile
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
@@ -110,20 +109,3 @@ def source_url(url: str):
|
|||||||
tar.extractall(extract_dir)
|
tar.extractall(extract_dir)
|
||||||
with open("./target/sources.tag", "wt+") as file:
|
with open("./target/sources.tag", "wt+") as file:
|
||||||
file.write(sources_dir)
|
file.write(sources_dir)
|
||||||
|
|
||||||
|
|
||||||
def _git_repo_name(url: str) -> str:
|
|
||||||
return url.split("/")[-1].replace(".git", "")
|
|
||||||
|
|
||||||
|
|
||||||
def source_git(url: str, branch: str | None = None):
|
|
||||||
source_path = os.getcwd() + "/target/" + _git_repo_name(url)
|
|
||||||
if os.path.exists("./target/sources.tag"):
|
|
||||||
return
|
|
||||||
cmdline = ["git", "clone", "--depth=1"]
|
|
||||||
if branch:
|
|
||||||
cmdline += ["-b", branch]
|
|
||||||
cmdline += [url, source_path]
|
|
||||||
subprocess.run(cmdline, check=True)
|
|
||||||
with open("./target/sources.tag", "wt+") as file:
|
|
||||||
file.write(source_path)
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("1.59.2")
|
||||||
|
source_git("https://github.com/mirabilos/mksh-cvs2git.git", "mksh-R59c")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
os.system("sh ./Build.sh")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_mksh(composer):
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.addfile("mksh", "bin/mksh")
|
||||||
|
|
||||||
|
|
||||||
|
package("mksh")
|
||||||
|
on_pack(pack_mksh)
|
||||||
Reference in New Issue
Block a user