#!/bin/bash
pushd () {
    command pushd "$@" > /dev/null
}

popd () {
    command popd "$@" > /dev/null
}
ROCMDIR=@ROCM_PATH@
HIPDIR=$ROCMDIR/hip

# Soft-link to bin files
HIPBINFILES=$HIPDIR/bin/*
ROCMBINDIR=$ROCMDIR/bin
mkdir -p $ROCMBINDIR
pushd $ROCMBINDIR
for f in $HIPBINFILES
do
    ln -r -s -f $f $(basename $f)
done
    ln -r -s -f $HIPDIR/bin/.hipVersion .hipVersion
popd

# Soft-link to headers
HIPINCDIR=$HIPDIR/include/hip
ROCMINCDIR=$ROCMDIR/include
mkdir -p $ROCMINCDIR
pushd $ROCMINCDIR
    ln -r -s -f $HIPINCDIR hip
popd
