Skip to content

Commit 4b5145f

Browse files
committed
Add explanation of sed commands
1 parent 9576cd4 commit 4b5145f

File tree

1 file changed

+12
-1
lines changed
  • docs/mscs/adjusting-world-server-properties

1 file changed

+12
-1
lines changed

docs/mscs/adjusting-world-server-properties/forge.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,18 @@ sed -i "s|\"\$@|--nogui &|g" run.sh
110110
sed -i "s|libraries|$(pwd)/libraries|g" libraries/net/minecraftforge/forge/*/unix_args.txt
111111
```
112112

113-
Continue below at **<a href="#end-manual">You may also want...</a>**
113+
<details>
114+
<summary>Explanation of the sed commands</summary>
115+
116+
`sed -i "\|@[^\"]|s|@|@$(pwd)/|" run.sh`: This matches all occurences of `@` that aren't followed by `"` and adds the current directory followed by a / to it (or rather, replaces the `@` with an `@` followed by the current directory).
117+
118+
`sed -i "s|\"\$@|--nogui &|g" run.sh`: This adds `--nogui ` in front of `"$@`, with `&` being the matched pattern.
119+
120+
`sed -i "s|libraries|$(pwd)/libraries|g" libraries/net/minecraftforge/forge/*/unix_args.txt`: This adds the current path to all occurences of the word libraries in the unix_args.txt file. Because the directory contains the forge version (for example `1.17.1-37.1.1`), `*` is used as a wildcard.
121+
122+
</details>
123+
<br>
124+
Continue below at <a href="#end-manual"><strong>You may also want...</strong></a>
114125

115126
### Manual
116127

0 commit comments

Comments
 (0)