mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2024-12-22 09:00:14 +00:00
add non interactive modes to build scripts
This commit is contained in:
parent
3d10a8fe06
commit
43c0631f9b
@ -1,8 +1,16 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-y", "--yes", help="use assumed node bin directory.", action="store_true"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def runcmd(cmd):
|
def runcmd(cmd):
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
return subprocess.check_output(cmd, shell=True)
|
return subprocess.check_output(cmd, shell=True)
|
||||||
@ -17,8 +25,11 @@ try:
|
|||||||
except:
|
except:
|
||||||
node_bin = Path(out.decode('utf-8').rstrip())
|
node_bin = Path(out.decode('utf-8').rstrip())
|
||||||
|
|
||||||
print(f"assuming npm bin directory \"{node_bin}\". Is this correct?")
|
args = parser.parse_args()
|
||||||
if input("[yY/nN]: ").lower() == "n":
|
|
||||||
|
if not args.yes:
|
||||||
|
print(f"assuming npm bin directory \"{node_bin}\". Is this correct?")
|
||||||
|
if input("[yY/nN]: ").lower() == "n":
|
||||||
node_bin = local_path.parent / 'node_modules' / '.bin'
|
node_bin = local_path.parent / 'node_modules' / '.bin'
|
||||||
print(f"this? \"{node_bin}\"")
|
print(f"this? \"{node_bin}\"")
|
||||||
if input("[yY/nN]: ").lower() == "n":
|
if input("[yY/nN]: ").lower() == "n":
|
||||||
|
@ -3,8 +3,16 @@ import sass
|
|||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-y", "--yes", help="use assumed node bin directory.", action="store_true"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def runcmd(cmd):
|
def runcmd(cmd):
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
return subprocess.check_output(cmd, shell=True)
|
return subprocess.check_output(cmd, shell=True)
|
||||||
@ -19,8 +27,11 @@ try:
|
|||||||
except:
|
except:
|
||||||
node_bin = Path(out.decode('utf-8').rstrip())
|
node_bin = Path(out.decode('utf-8').rstrip())
|
||||||
|
|
||||||
print(f"assuming npm bin directory \"{node_bin}\". Is this correct?")
|
args = parser.parse_args()
|
||||||
if input("[yY/nN]: ").lower() == "n":
|
|
||||||
|
if not args.yes:
|
||||||
|
print(f"assuming npm bin directory \"{node_bin}\". Is this correct?")
|
||||||
|
if input("[yY/nN]: ").lower() == "n":
|
||||||
node_bin = local_path.parent / 'node_modules' / '.bin'
|
node_bin = local_path.parent / 'node_modules' / '.bin'
|
||||||
print(f"this? \"{node_bin}\"")
|
print(f"this? \"{node_bin}\"")
|
||||||
if input("[yY/nN]: ").lower() == "n":
|
if input("[yY/nN]: ").lower() == "n":
|
||||||
|
Loading…
Reference in New Issue
Block a user