WIP
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
|
||||
export UNAME="$(uname)"
|
||||
setopt aliases complete_aliases
|
||||
unsetopt multios
|
||||
|
||||
function jjOsPackageMamanger {
|
||||
|
||||
SUPPORTED_PACKAGE_MANAGERS=("apt-get -y" "brew" "yum -y")
|
||||
|
||||
for i in "${SUPPORTED_PACKAGE_MANAGERS[@]}"; do
|
||||
PACKAGE_MANAGER=($i)
|
||||
if test "$( which "$PACKAGE_MANAGER" )"; then
|
||||
echo "$(which ${PACKAGE_MANAGER[0]}) ${PACKAGE_MANAGER[1]} $1"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function jjIsFileOlderDuration {
|
||||
if [[ ! $(find "$1" -newermt "$2 ago") ]]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
function jjIsFileNewerFile {
|
||||
if [[ "$1" -nt "$2" ]]; then
|
||||
echo "File ($(date -r $1)) '$1' is newer than"
|
||||
echo "file ($(date -r $2)) '$2'!"
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
function jjCliLog {
|
||||
"$JJ_SOURCE_DIR/helpers/jjLogger.ts" $1 ${@:2}
|
||||
}
|
||||
Reference in New Issue
Block a user