mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-22 13:31:11 +01:00
Add easier support for installing in offline mode
This commit is contained in:
parent
01725388a6
commit
ddc73230d8
@ -142,9 +142,13 @@ hishtory config-set filter-duplicate-commands true
|
||||
<details>
|
||||
<summary>Offline Install Without Syncing</summary><blockquote>
|
||||
|
||||
If you don't need the ability to sync your shell history, you can install hiSHtory in offline mode.
|
||||
If you don't need the ability to sync your shell history, you can install hiSHtory in offline mode:
|
||||
|
||||
Download the latest binary from [Github Releases](https://github.com/ddworken/hishtory/releases), and then run `./hishtory-binary install --offline` to install hiSHtory in a fully offline mode. This disables syncing and it is not possible to re-enable syncing after doing this.
|
||||
```
|
||||
curl https://hishtory.dev/install.py | HISHTORY_OFFLINE=true python3 -
|
||||
```
|
||||
|
||||
This disables syncing and it is not possible to re-enable syncing after doing this.
|
||||
|
||||
</blockquote></details>
|
||||
|
||||
|
@ -38,7 +38,10 @@ if os.path.exists(tmpFilePath):
|
||||
with open(tmpFilePath, 'wb') as f:
|
||||
f.write(hishtory_binary)
|
||||
os.system('chmod +x ' + tmpFilePath)
|
||||
exitCode = os.system(tmpFilePath + ' install')
|
||||
cmd = tmpFilePath + ' install'
|
||||
if os.environ.get('HISHTORY_OFFLINE'):
|
||||
cmd += " --offline"
|
||||
exitCode = os.system(cmd)
|
||||
if exitCode != 0:
|
||||
raise Exception("failed to install downloaded hishtory client via `" + tmpFilePath +" install` (is that directory mounted noexec? Consider setting an alternate directory via the TMPDIR environment variable)!")
|
||||
print('Succesfully installed hishtory! Open a new terminal, try running a command, and then running `hishtory query`.')
|
||||
|
Loading…
Reference in New Issue
Block a user