Skip to content

Commit

Permalink
Fix wrong script uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarBLG committed Oct 15, 2024
1 parent e8c468c commit 887715c
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions utils/etcs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/bash

if [[ "$1" = "evc" ]]; then
exec evc
elif [[ "$1" = "dmi" ]]; then
exec dmi
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
if [[ $1 = "evc" ]]; then
exec $DIR/evc
elif [[ $1 = "dmi" ]]; then
exec $DIR/dmi
else
dmi &
exec evc
$DIR/dmi &
exec $DIR/evc
fi

0 comments on commit 887715c

Please sign in to comment.