Allow leafdrop to be run outside its directory

For instance, this allows the user to create an alias or wrapper script
which can be run from the command line from any working directory.
This commit is contained in:
Yaakov Selkowitz 2024-01-17 18:47:58 -05:00
commit 53b80fbd52

View file

@ -17,6 +17,7 @@
# SPDX-License-Identifier: Unlicense
import argparse
import os
import shutil
import subprocess
@ -173,10 +174,10 @@ def main() -> int:
args = parser.parse_args()
with open("steam_multilib_packages.txt") as file:
with open(os.path.join(os.path.dirname(__file__), "steam_multilib_packages.txt")) as file:
steam_multilib_packages = file.read().strip().splitlines()
with open("wine_multilib_packages.txt") as file:
with open(os.path.join(os.path.dirname(__file__), "wine_multilib_packages.txt")) as file:
wine_multilib_packages = file.read().strip().splitlines()
short_circuit = False