Skip to content

Commit b2686c0

Browse files
committed
QOL features
1 parent 693c134 commit b2686c0

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
# Dot-Vault
22
My own dotfile management tool, written in Lua!
33

4-
Still need to install the apps myself to the system not just run script
5-
64
# How to install dependencies
75
`chmod +x install.sh ; ./install.sh`
86

97
# How to make script global
108
Give correct permissions to script
119
`chmod +x dvc.lua`
12-
Move to ~/.local/bin via sudo
13-
`sudo mv dvc.lua /usr/local/bin/dvc`
14-
or copy the file to ~/.local/bin
15-
`sudo cp dvc.lua /usr/local/bin/dvc`
10+
Then run `globalize.sh`
1611

1712
## Dependencies
1813
`lua, git, luarocks`

dvc.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function help_screen()
1414
]])
1515
end
1616
function version()
17-
local project_verison = "v1.3.0"
17+
local project_verison = "v1.3.2"
1818
print([[
1919
2020
$$$$$$$\ $$\ $$\ $$\ $$\ $$\ $$$$$$\ $$\ $$$$$$\
@@ -31,6 +31,16 @@ function version()
3131
end
3232

3333
function installation()
34+
print("Confirm you want to install dotfiles? [Y/n]")
35+
local confirm_install = io.read()
36+
if confirm_install == "N" or confirm_install == "n" then
37+
os.exit(1)
38+
elseif confirm_install == "Y" or confirm_install == "y" then
39+
print("Preceding...")
40+
else
41+
print(confirm_install .. " was not an option")
42+
end
43+
3444
local home = os.getenv("HOME")
3545
local used_configs = io.open("used_configs.txt", "r")
3646
if not used_configs then

globalize.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
read -p "Do you want to make DVC global? [Y/n] " response
3+
4+
# Default to "Y" if empty
5+
response=${response:-Y}
6+
7+
if [[ "$response" == "y" || "$response" == "Y" ]]; then
8+
sudo cp dvc.lua /usr/local/bin/dvc
9+
echo "DVC installed globally."
10+
else
11+
echo "Exiting"
12+
fi
13+

0 commit comments

Comments
 (0)