mirror of
https://github.com/mr0xb/scripts.git
synced 2026-08-27 19:34:57 -04:00
21 lines
470 B
Shell
Executable file
21 lines
470 B
Shell
Executable file
#!/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."
|
|
|