Created
November 11, 2022 07:40
-
-
Save tuantmb/e4c51f81094e070ec249f71f88a9aead to your computer and use it in GitHub Desktop.
Just a wrapper for pebear
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# just a wrapper for pebear | |
# | |
ALL_ARGUMENTS="$@" | |
CURRENT_DIRECTORY=$(pwd) | |
PATH_PEBEAR_DIRECTORY=/opt/pebear/ | |
PATH_PEBEAR_BIN=${PATH_PEBEAR_DIRECTORY}/PE-bear | |
PATH_PEBEAR_SIGNATURES=${PATH_PEBEAR_DIRECTORY}/signatures | |
# check file in ARGUMENTS exist in current directory | |
PATH_EXE_BIN="" | |
PATH_TMP=${CURRENT_DIRECTORY}/$1 | |
if [[ -f ${PATH_TMP} ]] | |
then | |
PATH_EXE_BIN=${PATH_TMP} | |
else | |
PATH_TMP=${ALL_ARGUMENTS} | |
if [[ -f ${PATH_TMP} ]] | |
then | |
PATH_EXE_BIN=${PATH_TMP} | |
fi | |
fi | |
echo "EXECUTABLE BIN Path: $PATH_EXE_BIN" | |
(cd $PATH_PEBEAR_SIGNATURES; echo "Active pwd: $(pwd)" && exec $PATH_PEBEAR_BIN $PATH_EXE_BIN & cd -) 2>&1 1>/dev/null | |
yes | echo | |
#echo $(pwd) 2&>1 >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment