File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,14 @@ if [[ -n "$DPDK_VERSION" ]]; then
169169 # Create alias for _avx2 / _avx512 versions
170170 if [[ $DPDK_VERSION == * _* ]]; then
171171 DPDK_VERSION_BASE=${DPDK_VERSION% _* }
172+ # If the folder without _ exists, try to remove it
172173 if [ -e " /opt/dpdk/$DPDK_VERSION_BASE " ]; then
173- rm -Rf " /opt/dpdk/$DPDK_VERSION_BASE "
174+ rm -Rf " /opt/dpdk/$DPDK_VERSION_BASE " || echo " /opt/dpdk/$DPDK_VERSION_BASE already exists!!"
175+ fi
176+ # If we can create the hard line, we change DPDK_VERSION to the new version without _
177+ if ln -s " /opt/dpdk/$DPDK_VERSION " " /opt/dpdk/$DPDK_VERSION_BASE " ; then
178+ DPDK_VERSION=$DPDK_VERSION_BASE
174179 fi
175- ln -s " /opt/dpdk/$DPDK_VERSION " " /opt/dpdk/$DPDK_VERSION_BASE "
176- DPDK_VERSION=$DPDK_VERSION_BASE
177180 fi
178181 export DPDK_DIR=" /opt/dpdk/$DPDK_VERSION "
179182 echo " DPDK_DIR set to $DPDK_DIR "
You can’t perform that action at this time.
0 commit comments