Skip to content

Commit

Permalink
should fix all issues git sparse-checkout command
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ex4 committed Oct 17, 2023
1 parent 4f6b218 commit 1b16f43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY requirements.txt /tmp/
RUN pip install --no-cache-dir --requirement /tmp/requirements.txt && rm /tmp/requirements.txt

RUN mkdir -p /app/data
# RUN git clone --depth=1 --no-checkout https://github.com/blawar/titledb.git /app/data/titledb
RUN git clone --depth=1 --no-checkout https://github.com/blawar/titledb.git /app/data/titledb

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions app/titles.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ def get_all_existing_versions(titleid):


def set_titledb_default_files():
os.system(f"cd {TITLEDB_DIR} && git sparse-checkout set {'./' + ' ./'.join(TITLEDB_DEFAULT_FILES)} --no-cone > /dev/null")
os.system(f"cd {TITLEDB_DIR} && git sparse-checkout set {'/' + ' /'.join(TITLEDB_DEFAULT_FILES)} --no-cone > /dev/null")

def set_titledb_lang_file(region, language):
os.system(f'cd {TITLEDB_DIR} && git sparse-checkout add {region}.{language}.json > /dev/null')
os.system(f'cd {TITLEDB_DIR} && git sparse-checkout add /{region}.{language}.json > /dev/null')

def git_fetch_and_pull():
os.system(f'cd {TITLEDB_DIR} && git checkout master > /dev/null 2>&1')
Expand Down
1 change: 1 addition & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GROUP=$(getent group "${gid}" | cut -d ":" -f 1)
! getent passwd "${uid}" && adduser -u "${uid}" -G "${GROUP}" -S ownfoil

chown -R ${uid}:${gid} /app
chown -R ${uid}:${gid} /root

echo "Starting ownfoil"

Expand Down

0 comments on commit 1b16f43

Please sign in to comment.