Skip to content

Commit 60ef37d

Browse files
fix -install_remote, /usr/bin/warp unlink
1 parent 751a6e4 commit 60ef37d

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

core/setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,15 @@ def setup_warp(base_dir):
5959

6060
def setup_warp_remote(ssh_alias, base_dir, dev):
6161
### tunnel to a remote machine and install warp-cli
62-
git_clone = ' "cd ' + base_dir + ' && git clone --recurse-submodules https://github.com/JustinTimperio/warp-cli.git &&'
63-
build = ' python3 ' + base_dir + '/warp-cli/core/warp.py --install"'
62+
git_clone = 'git clone --recurse-submodules https://github.com/JustinTimperio/warp-cli.git ' + base_dir + '/warp-cli &&'
63+
build = ' python3 ' + base_dir + '/warp-cli/core/warp.py --install'
64+
dev_switch = ' cd '+ base_dir + '/warp-cli/ && git checkout development && git submodule update --init --recursive && '
6465
if dev == False:
65-
os.system('ssh ' + ssh_alias + git_clone + build)
66+
os.system('ssh -t ' + ssh_alias +' "'+ git_clone + build +'"')
6667
if dev == True:
67-
os.system('ssh ' + ssh_alias + git_clone + ' cd warp-cli/ && git checkout development && git submodule update --init --recursive &&' + build)
68+
os.system('ssh -t ' + ssh_alias +' "'+ git_clone + dev_switch + build +'"')
6869

6970
def uninstall_warp(base_dir):
7071
rm_dir(base_dir, sudo=True)
71-
rm_file('/usr/bin/warp', sudo=True)
72+
os.system('sudo rm /usr/bin/warp')
7273
print('Warp-CLI Uninstalled!')

core/warp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def start_recv_daemon(recv_path):
100100
### install commands
101101
parser.add_argument("-in", "--install", action='store_true', help="Attempt an automated install of WDT and dependencies.")
102102
parser.add_argument("-ir", "--install_remote", nargs=2, metavar='SSH.ALIAS /DIR/TO/INSTALL', help="Attempt an automated install of WDT and dependencies on a remote machine.")
103-
parser.add_argument("-dev", "--dev_install", default=False, help="Install the Dev branch of Warp-CLI during a remote install. For Dev use only!")
103+
parser.add_argument("-dev", "--dev_install", action='store_true', help="Install the Dev branch of Warp-CLI during a remote install. For Dev use only!")
104104
parser.add_argument("-rm", "--uninstall", action='store_true', help="Remove Warp-CLI and config files.")
105105

106106
############
@@ -144,7 +144,7 @@ def start_recv_daemon(recv_path):
144144

145145
if args.install_remote:
146146
from setup import *
147-
setup_warp_remote(''.join(args.install_remote[:-1]), ''.join(args.install_remote[1:], arg.dev_install))
147+
setup_warp_remote(''.join(args.install_remote[:-1]), ''.join(args.install_remote[1:]), args.dev_install)
148148

149149
if args.uninstall == True:
150150
from setup import *

0 commit comments

Comments
 (0)