Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spam] #3489

Closed
wants to merge 1 commit into from
Closed

[spam] #3489

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions OS
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# Define the base directory for the "OS"
OS_NAME="UniqueOS"
BASE_DIR="$HOME/$OS_NAME"

# Create the base directory
mkdir -p "$BASE_DIR"

# Create essential directories
mkdir -p "$BASE_DIR/bin"
mkdir -p "$BASE_DIR/etc"
mkdir -p "$BASE_DIR/lib"
mkdir -p "$BASE_DIR/var"
mkdir -p "$BASE_DIR/home/user"

# Create some placeholder files
echo "#!/bin/bash" > "$BASE_DIR/bin/hello"
echo "echo 'Welcome to $OS_NAME!'" >> "$BASE_DIR/bin/hello"
chmod +x "$BASE_DIR/bin/hello"

echo "UniqueOS Configuration" > "$BASE_DIR/etc/os.conf"
echo "Version: 1.0" >> "$BASE_DIR/etc/os.conf"
echo "Maintainer: Your Name" >> "$BASE_DIR/etc/os.conf"

# Create a README file
cat <<EOL > "$BASE_DIR/README.txt"
Welcome to $OS_NAME!

This is a minimal simulation of an operating system structure.

Directories created:
- bin: Contains executable files
- etc: Configuration files
- lib: Libraries
- var: Variable data
- home/user: User home directory

To run the sample program, use:
$BASE_DIR/bin/hello

Enjoy your unique OS experience!
EOL

# Print the structure
echo "Unique OS structure created at: $BASE_DIR"
tree "$BASE_DIR"
Loading