Skip to content
Snippets Groups Projects
Commit a22d3b50 authored by Patrick Robbe's avatar Patrick Robbe
Browse files

Improve setup scripts

parent 033a731f
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ pids_bar2= ...@@ -116,7 +116,7 @@ pids_bar2=
get_pids() { get_pids() {
# $1: file to check # $1: file to check
# $2: variable to append pids to # $2: variable to append pids to
pids=`lsof -t $1` pids=`sudo lsof -t $1`
for pid in $pids; do for pid in $pids; do
ps -p $pid --no-headers -o " %U%p%c" ps -p $pid --no-headers -o " %U%p%c"
eval "${2}+=\ ${pid}" eval "${2}+=\ ${pid}"
...@@ -174,7 +174,7 @@ devs_removed= ...@@ -174,7 +174,7 @@ devs_removed=
if [ ${RELOAD_MODULE} -eq 1 ]; then if [ ${RELOAD_MODULE} -eq 1 ]; then
sudo rmmod pcie40 sudo rmmod pcie40
sudo insmod ${HOME}/software/Pcie40Driver/pcie40.ko sudo insmod ${PCIE40_DRIVER_DIR}/pcie40.ko
else else
for dev in ${devs[@]}; do for dev in ${devs[@]}; do
if [ ${RELOAD_ALL} -eq 0 ] && [ -f "${dev}/pcie40_loaded" ] && [ $(< ${dev}/pcie40_loaded) -eq 1 ]; then if [ ${RELOAD_ALL} -eq 0 ] && [ -f "${dev}/pcie40_loaded" ] && [ $(< ${dev}/pcie40_loaded) -eq 1 ]; then
......
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export PYTHONPATH=${PYTHONPATH}:${DIR}/../Python export PYTHONPATH=${PYTHONPATH}:${DIR}/../Python
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:../Pcie40Libraries/lib:../Pcie40DriverLibraries export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DIR}/../Pcie40Libraries/lib:${DIR}/../Pcie40DriverLibraries
export PATH=${PATH}:${DIR}/../Pcie40Applications export PATH=${PATH}:${DIR}/../Pcie40Applications
export PCIE40_DRIVER_DIR=${DIR}/../Pcie40Driver
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment