Compare commits
4 Commits
368bc11acf
...
v3.6.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39a7e7b40f | ||
|
|
6d5d872b71 | ||
|
|
128cfe8c87 | ||
|
|
e1c2705fdd |
@@ -7,6 +7,14 @@ Current version from Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
Version history:
|
Version history:
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
# 05/03/2026 v3.6.1
|
||||||
|
Fix a typo in compress.sh
|
||||||
|
|
||||||
|
# 05/03/2026 v3.6.0
|
||||||
|
Improved utaz to make it multiformat with lot of it
|
||||||
|
Introduced ppu and ppn
|
||||||
|
Improved update system
|
||||||
|
|
||||||
# 04/03/2026 v3.5.0
|
# 04/03/2026 v3.5.0
|
||||||
rain has now configurable speed and color
|
rain has now configurable speed and color
|
||||||
showinfo adapted to fastfetch, replacing neofetch
|
showinfo adapted to fastfetch, replacing neofetch
|
||||||
|
|||||||
@@ -261,7 +261,8 @@ utaz()
|
|||||||
command -v ${cmd} >/dev/null 2>&1 || {
|
command -v ${cmd} >/dev/null 2>&1 || {
|
||||||
disp E "Binary ${cmd} necessary to extract ${f} is missing."
|
disp E "Binary ${cmd} necessary to extract ${f} is missing."
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
disp I "Processing archive ${f} with ${extractor}..."
|
disp I "Processing archive ${f} with ${extractor}..."
|
||||||
mkdir -p "${dir}"
|
mkdir -p "${dir}"
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ ku Kill process owned by users in parameter
|
|||||||
mcd Create a directory and go inside
|
mcd Create a directory and go inside
|
||||||
meteo Display curent weather forecast for the configured city
|
meteo Display curent weather forecast for the configured city
|
||||||
ppg Display process matching the given parameter
|
ppg Display process matching the given parameter
|
||||||
|
ppn Display process matching the exact process name given in parameter
|
||||||
|
ppu Display processes owned by the given user
|
||||||
rain Let the rain fall
|
rain Let the rain fall
|
||||||
rmhost Remove host (IP and/or DNS name) for current known_host
|
rmhost Remove host (IP and/or DNS name) for current known_host
|
||||||
rmspc Remove spaces from all the files in working directory
|
rmspc Remove spaces from all the files in working directory
|
||||||
|
|||||||
@@ -43,6 +43,39 @@ ppg()
|
|||||||
}
|
}
|
||||||
export -f ppg
|
export -f ppg
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# List processes owned by a specific user
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
ppu()
|
||||||
|
{
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
disp E "Usage: ppu <username>"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -u lists processes for a specific user
|
||||||
|
# -o provides a clean, standard output format
|
||||||
|
ps -u "$1" -o pid,user,%cpu,%mem,start,time,command
|
||||||
|
}
|
||||||
|
export -f ppu
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# List processes by exact command name (no path/parameters)
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
ppn()
|
||||||
|
{
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
disp E "Usage: ppn <command_name>"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -e: select all processes
|
||||||
|
# -o: specify custom output columns (PID and Command name)
|
||||||
|
# grep -w: ensures exact word matching so 'bash' doesn't match 'dbash'
|
||||||
|
ps -eo pid,comm | grep -w "$1"
|
||||||
|
}
|
||||||
|
export -f ppn
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Get PID list of the given process name
|
# Get PID list of the given process name
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -63,7 +96,7 @@ gpid()
|
|||||||
export -f gpid
|
export -f gpid
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Kill all processes owned by the given users
|
# Kill all processes owned by the given users (kill user)
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
ku()
|
ku()
|
||||||
{
|
{
|
||||||
@@ -74,7 +107,7 @@ ku()
|
|||||||
export -f ku
|
export -f ku
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Kill all children of a process then the process
|
# Kill all children of a process then the process (kill tree)
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
kt()
|
kt()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ check_updates()
|
|||||||
# Quiet mode is mostly used internally when profile_upgrade is called
|
# Quiet mode is mostly used internally when profile_upgrade is called
|
||||||
quiet=1
|
quiet=1
|
||||||
fi
|
fi
|
||||||
disp I "Checking for updates..."
|
[[ -n $quiet ]] && disp I "Checking for updates..."
|
||||||
local vfile="/tmp/version"
|
local vfile="/tmp/version"
|
||||||
wget "$UPDT_URL/version" -O $vfile >/dev/null 2>&1 || {
|
wget "$UPDT_URL/version" -O $vfile >/dev/null 2>&1 || {
|
||||||
disp E "Can't download version file, impossible to proceed!"
|
disp E "Can't download version file, impossible to proceed!"
|
||||||
@@ -61,7 +61,7 @@ check_updates()
|
|||||||
[[ $quiet ]] && disp I "You should upgrade to last version when possible."
|
[[ $quiet ]] && disp I "You should upgrade to last version when possible."
|
||||||
result=1
|
result=1
|
||||||
else
|
else
|
||||||
disp I "Your version is up-to-date."
|
[[ -n $quiet ]] && disp I "Your version is up-to-date."
|
||||||
result=0
|
result=0
|
||||||
fi
|
fi
|
||||||
rm -f $vfile
|
rm -f $vfile
|
||||||
@@ -77,12 +77,10 @@ check_updates()
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
profile_upgrade()
|
profile_upgrade()
|
||||||
{
|
{
|
||||||
check_updates -q
|
if check_updates -q; then
|
||||||
local need_update=$?
|
|
||||||
[[ $need_update -ne 1 ]] && {
|
|
||||||
disp "No update available."
|
disp "No update available."
|
||||||
return 0
|
return 0
|
||||||
}
|
fi
|
||||||
|
|
||||||
if [[ -s $MYPATH/profile.sh ]]; then
|
if [[ -s $MYPATH/profile.sh ]]; then
|
||||||
disp E "Installation path detection failed, cannot upgrade automatically."
|
disp E "Installation path detection failed, cannot upgrade automatically."
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ done
|
|||||||
# Interactive shell detection, two methods available each one of those might have different result
|
# Interactive shell detection, two methods available each one of those might have different result
|
||||||
# depending on distribution
|
# depending on distribution
|
||||||
#shopt -q login_shell && INTERACTIVE=1
|
#shopt -q login_shell && INTERACTIVE=1
|
||||||
[[ $- == *i* ]] && INTERACTIVE=1
|
[[ $- == *i* ]] && export INTERACTIVE=1
|
||||||
|
|
||||||
if [[ $INTERACTIVE ]]; then
|
if [[ $INTERACTIVE ]]; then
|
||||||
# For compiling (as we often compile with LFS/0linux...)
|
# For compiling (as we often compile with LFS/0linux...)
|
||||||
@@ -184,6 +184,7 @@ if [[ $INTERACTIVE ]]; then
|
|||||||
# Set default language
|
# Set default language
|
||||||
setfr
|
setfr
|
||||||
showinfo
|
showinfo
|
||||||
|
check_updates -q
|
||||||
disp I "Profile version $PROFVERSION chargé..."
|
disp I "Profile version $PROFVERSION chargé..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user