mirror of
https://github.com/mr0xb/scripts.git
synced 2026-08-27 19:34:57 -04:00
add old scripts
This commit is contained in:
parent
1c58245cc5
commit
9c1772908b
18 changed files with 338 additions and 0 deletions
21
util/ramwork
Executable file
21
util/ramwork
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Create a temporary RAM-backed workspace in /dev/shm
|
||||
WORKDIR="/dev/shm/work_$$"
|
||||
mkdir -p "$WORKDIR"
|
||||
|
||||
echo "🚀 RAM workspace created at: $WORKDIR"
|
||||
echo "Type 'exit' when you're done to clean it up."
|
||||
echo
|
||||
|
||||
# Start an interactive subshell **inside** the RAM dir
|
||||
(
|
||||
cd "$WORKDIR" || exit 1
|
||||
bash --noprofile --norc -i
|
||||
)
|
||||
|
||||
# Cleanup happens AFTER the subshell exits
|
||||
echo "🧹 Cleaning up RAM workspace: $WORKDIR"
|
||||
rm -rf "$WORKDIR"
|
||||
echo "Done."
|
||||
|
||||
Loading…
Reference in a new issue