Skip to content

Commit 4b28b32

Browse files
committed
Merge branch 'master' of https://github.com/mc-cc-scripts/script-manager into ChristophLHR-script-manager-Readme-Changes
2 parents 71815f2 + 671f006 commit 4b28b32

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ By default, without parameters, `update` updates the SCM script.
2121
- `all`: Removes and downloads all installed scripts.
2222
- `<name> <sourceName>`: Removes and downloads an installed script from a specific source. Sources can be added via the `source` command.
2323
## source
24+
**`source` commands have not yet been implemented.**
25+
Feel free to do so [here](https://github.com/mc-cc-scripts/script-manager/issues/2).
2426
- `add <scriptName> <sourceName> <source>`: Adds a source (URL, Pastebin Code, ...) with a name to a script.
2527
- `get <scriptName>`: Shows all sources of a script.
2628
- `remove <scriptName> <sourceName>`: Removes a source from a script.
@@ -39,6 +41,7 @@ Shows all available configurations.
3941
Shows all available commands and their description.
4042
- `<name>`: Shows the description of a command by name.
4143

44+
# Example
4245
## Requires
4346
If you want to load a library within a program and keep it updated through SCM, then you can do that with the following notation:
4447

@@ -47,7 +50,7 @@ local scm = require("./scm")
4750
scm:load("testLibrary")
4851
```
4952

50-
If the Library is already called by a Programm using this SCM loader, SCM will check all Libraries loaded for these comments:
53+
If the library is already called by a program using this SCM loader, SCM will check all libraries loaded for these comments:
5154

5255

5356
```lua
@@ -56,7 +59,7 @@ require("./libs/subLibrary")
5659

5760
```
5861
The comment tells SCM to look for the sub-library and, if it's not already installed, it will try to download it.
59-
This prevent the programm from Crashing, should SCM not be installed.
62+
This prevents the program from crashing, should SCM not be installed.
6063

6164
### Pastebin
6265

scm.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,11 @@ function scm:checkRequirements(name)
629629
end
630630

631631
if not scriptExists then
632-
self:download(tmpName .. "@" .. tmpCode, "library")
632+
if tmpCode then
633+
self:download(tmpName .. "@" .. tmpCode, "library")
634+
else
635+
self:download(n, "library")
636+
end
633637
else
634638
scm:log(n .. " already exists.")
635639
end

0 commit comments

Comments
 (0)