File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525## Installation
2626
2727``` bash
28- # Clone the repository
28+ # Clone the repository (anywhere you want)
2929git clone https://github.com/Dxsk/kvm-cli-scripts.git
30- cp -r kvm-cli-scripts ~ /Documents/scripts/kvm/
30+ cd kvm-cli-scripts
3131
3232# Source in current shell
33- source ~ /Documents/scripts/kvm/ source.me
33+ source source.me
3434
3535# For permanent setup, add to ~/.bashrc or ~/.zshrc
36- echo ' source ~/Documents/scripts /kvm/source.me' >> ~ /.bashrc
36+ echo ' source /path/to /kvm-cli-scripts /source.me' >> ~ /.bashrc
3737```
3838
3939## Usage
Original file line number Diff line number Diff line change 22# KVM Scripts - Shell Functions
33# Source this file in your .bashrc or .zshrc to enable kvm.* commands
44
5- KVM_SCRIPTS_PATH=" /home/$USER /Documents/scripts/kvm/"
5+ # Auto-detect script directory (works wherever you install it)
6+ # To set manually, comment the line below and uncomment the next one:
7+ # KVM_SCRIPTS_PATH="/your/custom/path/to/kvm-cli-scripts"
8+ KVM_SCRIPTS_PATH=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
69
710kvm.clone () { sudo bash " $KVM_SCRIPTS_PATH /clone.bash" ; }
811kvm.snapshot () { sudo bash " $KVM_SCRIPTS_PATH /snapshot.bash" ; }
You can’t perform that action at this time.
0 commit comments