mirror of
https://github.com/wcbing/wcbing-apt-repo.git
synced 2025-12-28 18:18:31 +08:00
35 lines
602 B
Python
Executable File
35 lines
602 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sqlite3
|
|
|
|
# create dir
|
|
if not os.path.exists("deb/amd64"):
|
|
os.makedirs("deb/amd64")
|
|
if not os.path.exists("deb/arm64"):
|
|
os.makedirs("deb/arm64")
|
|
|
|
# create table
|
|
conn = sqlite3.connect("data/deb.db")
|
|
conn.execute(
|
|
"""
|
|
CREATE TABLE IF NOT EXISTS x86_64 (
|
|
name TEXT UNIQUE,
|
|
version TEXT,
|
|
url TEXT
|
|
);
|
|
"""
|
|
)
|
|
conn.execute(
|
|
"""
|
|
CREATE TABLE IF NOT EXISTS arm64 (
|
|
name TEXT UNIQUE,
|
|
version TEXT,
|
|
url TEXT
|
|
);
|
|
"""
|
|
)
|
|
|
|
conn.commit()
|
|
conn.close()
|