Skip to content

Commit

Permalink
Updated to V2.0, full rewrite of FPkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ann-dvlpr authored Mar 25, 2024
1 parent aa35182 commit 634b78b
Show file tree
Hide file tree
Showing 9 changed files with 10,570 additions and 0 deletions.
51 changes: 51 additions & 0 deletions FPkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash
workedin=$(pwd)
cd ~/.FPkg

fpshell=$(cat ~/.FPkg/shell.var)
if [[ $fpshell == "" ]]
then
fpshell="bash"
echo "USING BASH SHELL, PLEASE EDIT ~/.FPkg/shell.var AND EDIT SHELL."
fi



if [[ $1 != "fphistory" ]]
then
echo $@ &>> history
$fpshell ~/.FPkg/packages/$@
comp=y
fi

if [[ $1 == "fphistory" ]]
then
if [[ $2 != "clear" ]]
then
$fpshell ~/.FPkg/packages/$(cat history | gum filter)
comp=y
fi

if [[ $2 == "clear" ]]
then
echo "Clearing history..."
rm -rf history
touch history
echo "Adding cancel option..."
echo "Cancel" &>> history
comp=y
fi
fi

if [[ $1 == "fsh" ]]
then
$fpshell ~/.FPkg/FSh
comp=y
fi

if [[ $comp == "" ]]
then
echo "FPkg: Wrong arguments / Code failure"
fi

cd $workedin
31 changes: 31 additions & 0 deletions FSh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

$(cat shell.var) ~/.FPkg/.fshrc

if [[ $(/bin/id -u) == 1000 ]]
then
user=$
elif [[ $(/bin/id -u) == 10264 ]]
then
user=$
elif [[ $(/bin/id -u) == 0 ]]
then
user=#
fi

read -p "$user:" cmd

if [[ $cmd == clear-shell-history ]]
then
echo "Clearing history..."
rm -rf shell-hist
touch shell-hist
echo "Adding cancel option..."
echo "Cancel" &>> shell-hist
dontexec=y
elif [[ $dontexec == "" ]]
then
echo $cmd &>> shell-hist
$cmd
fi
$(cat shell.var) ~/.FPkg/FSh
47 changes: 47 additions & 0 deletions banner
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
style=3

if [[ $style == 0 ]]
then
echo 'FPkg was loaded successfully'
fi

if [[ $style == 1 ]]
then
echo
echo
echo ' ███████ ██████ ██ ██ ██████ ██ ██ █████ ██████ ██████ ██ ██'
echo ' ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██'
echo ' █████ ██████ █████ ██ ███ ███ ███████ ██████ ██ ███████'
echo ' ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██'
echo ' ██ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ ██'
echo
echo
fi

if [[ $style == 2 ]]
then
echo
echo
echo
echo ' ▄██████ ██████▄ ▄█████▄'
echo ' ██ ██ ██ ██ ██ ▄▄'
echo ' █████ ██████▀ ██ ██ ▄████▄ ██ ██ ███████ ██▄██ ▄████ ██'
echo ' ██ ██ ████ ██ ██ ██ ██ ██ ██▀ ██ ████▄'
echo ' ██ ██ ██ ██ ▀█████ ██ ██ ██ ██ ██ ▀████ ██ ██'
echo ' ▄▄ ██'
echo ' Version: V2.0 | RELEASE ▀███▀ Made with ♥ by fluid-developer'
echo
fi

if [[ $style == 3 ]]
then
echo
echo
echo ' _____ ____ __'
echo ' | __| __ \ |--.---.'
echo ' | __| __/ <| _ |'
echo ' |_| |_| |__|__|__ |'
echo ' |___|'
echo ' V2.0R | Made with ♥ by fluid-developer'
echo
fi
11 changes: 11 additions & 0 deletions history
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Cancel
fpshell


hello


hello



3 changes: 3 additions & 0 deletions packages/Cancel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Cancel option
echo "Cancelling..."
exit 0
2 changes: 2 additions & 0 deletions packages/hello
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Testing purposes
echo "Hello, World! This is FPkg"
Loading

0 comments on commit 634b78b

Please sign in to comment.