move deb.db to data

This commit is contained in:
wcbing 2024-12-27 17:33:03 +08:00
parent b85da386c3
commit 308b51ddef
3 changed files with 5 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
data/github-local.json data/github-local.json
data/deb.db
deb/* deb/*
!deb/index.html !deb/index.html
!deb/add.sh !deb/add.sh
!deb/del.sh !deb/del.sh
deb.db

View File

@ -23,7 +23,7 @@ def download(url, base_dir):
def check_download(name, version, url, arch, base_dir="deb"): def check_download(name, version, url, arch, base_dir="deb"):
conn = sqlite3.connect(base_dir + ".db") conn = sqlite3.connect(f"data/{base_dir}.db")
cur = conn.cursor() cur = conn.cursor()
res = cur.execute( res = cur.execute(

View File

@ -1,4 +1,4 @@
#!/bin/python3 #!/usr/bin/env python3
import os import os
import sqlite3 import sqlite3
@ -10,7 +10,7 @@ if not os.path.exists("deb/arm64"):
os.makedirs("deb/arm64") os.makedirs("deb/arm64")
# create table # create table
conn = sqlite3.connect("deb.db") conn = sqlite3.connect("data/deb.db")
conn.execute( conn.execute(
""" """
CREATE TABLE IF NOT EXISTS x86_64 ( CREATE TABLE IF NOT EXISTS x86_64 (