aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-07-28 19:23:26 -0400
committerSquibid <me@zacharyscheiman.com>2023-07-28 19:23:26 -0400
commitaf125691f7920c3d61d127a261298b38fce1ca30 (patch)
treeefc7ff7db01236c4b1b7ea1d41336aed4a07617d
parent80de336bdbb7194ad4e2d5475d76b25f01c2cdcd (diff)
downloadeat-it-af125691f7920c3d61d127a261298b38fce1ca30.tar.gz
eat-it-af125691f7920c3d61d127a261298b38fce1ca30.tar.bz2
eat-it-af125691f7920c3d61d127a261298b38fce1ca30.zip
add bootstrap script and better instructions for installation
Diffstat (limited to '')
-rw-r--r--README.md11
-rw-r--r--bootstrap.lua8
2 files changed, 12 insertions, 7 deletions
diff --git a/README.md b/README.md
index 587b700..916ba9d 100644
--- a/README.md
+++ b/README.md
@@ -3,25 +3,22 @@ Eat It is a plugin manager for mpv which allows you to declare what files you
want from git repos.
## Installing Eat It
-To install Eat It simply put the `eatit.lua` file into your mpv scripts
-directory (~/.config/mpv/scripts by default on linux). After you have done that
-Eat It is installed, however it won't do anything without the `eatit-cfg.lua`,
-which has to be placed in the root of your mpv config dir (~/.config/mpv by
-default on linux).
-Alternatively you can run these two commands:
+### Fist time
+To install eatit run these two commands [Make sure you know what it does](https://explainshell.com/explain?cmd=curl+-L+https%3A%2F%2Fgit.squi.bid%2Feat-it%2Fplain%2Featit.lua+-o+~%2F.config%2Fmpv%2Fscripts%2Featit.lua+curl+-L+https%3A%2F%2Fgit.squi.bid%2Feat-it%2Fplain%2Featit-cfg.lua+-o+~%2F.config%2Fmpv%2Featit-cfg.lua):
```sh
curl -L https://git.squi.bid/eat-it/plain/eatit.lua -o ~/.config/mpv/scripts/eatit.lua
curl -L https://git.squi.bid/eat-it/plain/eatit-cfg.lua -o ~/.config/mpv/eatit-cfg.lua
```
+### Bootstraping
+The included bootstrap script will install and load eatit as soon as mpv starts.
## FAQ
Q: Where does the name 'Eat It' come from?
A: The plugin manager eats all the useless files and keeps the ones you want,
*and Weird Al is a funny guy*
## TODO
-- make an auto install script that can be put into a mpv config
## ALTERNATIVES
[email me](mailto:me@zacharyscheiman.com) if you know of any alternatives
diff --git a/bootstrap.lua b/bootstrap.lua
new file mode 100644
index 0000000..89b62fb
--- /dev/null
+++ b/bootstrap.lua
@@ -0,0 +1,8 @@
+os.execute('git clone https://git.squi.bid/eat-it /tmp/eatit-tmp')
+local a = io.open('/tmp/eatit-tmp/eatit.lua', 'r')
+local b = io.open(mp.command_native({'expand-path', '~~/scripts/eatit.lua'}), 'w')
+b:write(a:read('*a'))
+b:close()
+a:close()
+dofile(mp.command_native({'expand-path', '~~/scripts/eatit.lua'}))
+os.execute('rm -rf /tmp/eatit-tmp')