parent
0758b923be
commit
1218243ecc
@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
|
||||
CMD_1=$1
|
||||
CMD_2=$2
|
||||
|
||||
CLIENT_PATH=/mnt/c/Users/144311/OneDrive\ -\ Arrow\ Electronics,\ Inc/key/client
|
||||
MAN_PATH=/mnt/c/Users/144311/OneDrive\ -\ Arrow\ Electronics,\ Inc/key/manufacturer
|
||||
|
||||
CLIENT_PATH_TOGO=$CLIENT_PATH/$CMD_2
|
||||
MAN_PATH_TOGO=$MAN_PATH/$CMD_2
|
||||
|
||||
print_dir ()
|
||||
{
|
||||
for d in */ ; do #Cheking the directroy to print files
|
||||
if [ "$d" != "csl/" ];then #Exept csl/
|
||||
echo -e " |--> $d"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
goto_client ()
|
||||
{
|
||||
if [ -z "$CMD_2" ]
|
||||
then
|
||||
cd "$CLIENT_PATH"
|
||||
explorer.exe .
|
||||
elif [ "$CMD_2" == "list" ]
|
||||
then
|
||||
cd "$CLIENT_PATH"
|
||||
echo Currently awailable Clients are :
|
||||
print_dir
|
||||
else
|
||||
if [ -d "$CLIENT_PATH_TOGO" ]
|
||||
then
|
||||
cd "$CLIENT_PATH_TOGO"
|
||||
explorer.exe .
|
||||
else
|
||||
cd "$CLIENT_PATH"
|
||||
echo "Client not found"
|
||||
echo Currently awailable Clients are :
|
||||
print_dir
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
goto_manufacturer ()
|
||||
{
|
||||
if [ -z "$CMD_2" ]
|
||||
then
|
||||
cd "$MAN_PATH"
|
||||
explorer.exe .
|
||||
elif [ "$CMD_2" == "list" ]
|
||||
then
|
||||
cd "$MAN_PATH"
|
||||
echo Currently awailable Manufacturer are :
|
||||
print_dir
|
||||
else
|
||||
if [ -d "$MAN_PATH_TOGO" ]
|
||||
then
|
||||
cd "$MAN_PATH_TOGO"
|
||||
explorer.exe .
|
||||
else
|
||||
cd "$MAN_PATH"
|
||||
echo "Manufacturer not found"
|
||||
echo Currently awailable Manufacturer are :
|
||||
print_dir
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_command ()
|
||||
{
|
||||
if [ -z "$CMD_1" ]
|
||||
then
|
||||
echo no argument was given
|
||||
elif [ "$CMD_1" == "cli" ]
|
||||
then
|
||||
goto_client
|
||||
elif [ "$CMD_1" == "man" ]
|
||||
then
|
||||
goto_manufacturer
|
||||
else
|
||||
echo Invalid command : $CMD_1
|
||||
fi
|
||||
}
|
||||
|
||||
check_command
|
@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
|
||||
CMD_1=$1
|
||||
CMD_2=$2
|
||||
|
||||
OUTLOOK_EXE="/mnt/c/Program Files/Microsoft Office/root/Office16/OUTLOOK.EXE"
|
||||
OULOOK_CMD="/select"
|
||||
INBOX="outlook"
|
||||
CALENDAR="calendar"
|
||||
|
||||
TO_OPEN=""
|
||||
TO_EXE=""
|
||||
|
||||
CMD_CLIENT="cli"
|
||||
CMD_MAN="man"
|
||||
CMD_INBOX="inbox"
|
||||
CMD_SENT="sent"
|
||||
|
||||
OTLK_CLINENT="Kunden"
|
||||
OTLK_MAN="Hersteller"
|
||||
OTLK_INBOX="Posteingang"
|
||||
OTLK_SENT="Gesendete Elemente"
|
||||
|
||||
|
||||
goto_folder ()
|
||||
{
|
||||
exec "$OUTLOOK_EXE" $OULOOK_CMD $INBOX:$TO_OPEN
|
||||
}
|
||||
|
||||
goto_calendar ()
|
||||
{
|
||||
exec "$OUTLOOK_EXE" $OULOOK_CMD $INBOX:$CALENDAR
|
||||
}
|
||||
|
||||
|
||||
command_translator ()
|
||||
{
|
||||
if [ "$CMD_1" == "$CMD_CLIENT" ]
|
||||
then
|
||||
TO_OPEN=$OTLK_CLINENT
|
||||
elif [ "$CMD_1" == "$CMD_MAN" ]
|
||||
then
|
||||
TO_OPEN=$OTLK_MAN
|
||||
elif [ "$CMD_1" == "$CMD_INBOX" ]
|
||||
then
|
||||
TO_OPEN=$OTLK_INBOX
|
||||
elif [ "$CMD_1" == "$CMD_SENT" ]
|
||||
then
|
||||
TO_OPEN=$OTLK_SENT
|
||||
else
|
||||
echo Invalid command : $CMD_1
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
check_command ()
|
||||
{
|
||||
if [ -z "$CMD_1" ]
|
||||
then
|
||||
echo no argument was given
|
||||
elif [ "$CMD_1" == "cal" ]
|
||||
then
|
||||
goto_calendar
|
||||
else
|
||||
if [ -z "$CMD_2" ]
|
||||
then
|
||||
command_translator
|
||||
goto_folder
|
||||
else
|
||||
command_translator
|
||||
TO_OPEN=$TO_OPEN/$CMD_2
|
||||
goto_folder
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_command
|
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
CMD_1=$1
|
||||
CMD_2=$2
|
||||
|
||||
ONENOTE_EXE="/mnt/c/Program Files/Microsoft Office/root/Office16/ONENOTE.EXE"
|
||||
ONENOTE_CMD="/hyperlink"
|
||||
|
||||
|
||||
arr_cmds=("")
|
||||
arr_links=("")
|
||||
|
||||
arr_cmds+=("jorg")
|
||||
arr_links+=("onenote:https://arrowelectronics-my.sharepoint.com/personal/kerem_yollu_arrow_com/Documents/Kerem%20@%20Work/Teams.one#Jörg§ion-id={7964922E-F556-4D32-9719-9110CE683A03}&page-id={27CA5C72-9E93-4C87-BF75-E3D761B9F968}&end")
|
||||
|
||||
arr_cmds+=("sius")
|
||||
arr_links+=("onenote:https://arrowelectronics-my.sharepoint.com/personal/kerem_yollu_arrow_com/Documents/Kunde/Sius.one#20.08.2021%20IR%20sensor§ion-id={58C4B23C-1D45-47A5-B45A-03EBA63DF567}&page-id={E1554726-D580-44DC-9171-E7EFBD5C0E3D}&end")
|
||||
|
||||
|
||||
index=1
|
||||
|
||||
goto_folder ()
|
||||
{
|
||||
for list in "${arr_cmds[@]}"
|
||||
do
|
||||
for item in $list
|
||||
do
|
||||
if [ "$item" == "$CMD_1" ]
|
||||
then
|
||||
exec "$ONENOTE_EXE" $ONENOTE_CMD ${arr_links[$index]}
|
||||
fi
|
||||
((index=index + 1))
|
||||
done
|
||||
done
|
||||
echo Comman not found : $CMD_1
|
||||
exit
|
||||
}
|
||||
|
||||
check_command ()
|
||||
{
|
||||
if [ -z "$CMD_1" ]
|
||||
then
|
||||
echo no argument was given
|
||||
else
|
||||
goto_folder
|
||||
fi
|
||||
}
|
||||
|
||||
check_command
|
Loading…
Reference in new issue