diff --git a/README.md b/README.md index 4e45bdc..f54f3cd 100644 --- a/README.md +++ b/README.md @@ -142,9 +142,13 @@ hishtory config-set filter-duplicate-commands true
Offline Install Without Syncing
-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.
diff --git a/backend/web/landing/www/install.py b/backend/web/landing/www/install.py index 6a529b8..a68de88 100644 --- a/backend/web/landing/www/install.py +++ b/backend/web/landing/www/install.py @@ -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`.')