@@ -51,24 +51,8 @@ function get_pre_release_igfx() {
5151    if  [ " $GITHUB_TOKEN "   !=  " "   ];  then 
5252       HEADER=" Authorization: Bearer $GITHUB_TOKEN " 
5353    fi 
54- 
55-     WORK_DIR=" /tmp/igc-download" 
56-     mkdir -p " $WORK_DIR " 
57-     cd  " $WORK_DIR " 
58- 
59-     curl -L -H " $HEADER "   -H " Accept: application/vnd.github.v3+json"   " $URL "   -o " $HASH .zip" 
60-     
61-     unzip " $HASH .zip" 
62-     rm " $HASH .zip" 
63-     
64-     #  Move deb files back to the calling directory if any exist
65-     if  ls * .deb 1>  /dev/null 2>&1 ;  then 
66-         mv * .deb /tmp/
67-         cd  /tmp/
68-     fi 
69-     
70-     #  Clean up work directory
71-     rm -rf " $WORK_DIR " 
54+     curl -L -H " $HEADER "   -H " Accept: application/vnd.github.v3+json"   $URL  -o $HASH .zip
55+     unzip $HASH .zip &&  rm $HASH .zip
7256}
7357
7458function  build_level_zero_from_source()  {
@@ -214,50 +198,60 @@ InstallIGFX () {
214198    #  Backup and install it from release igc as a temporarily workaround
215199    #  while we working to resolve the issue.
216200    echo  " Backup libopencl-clang" 
201+     cp -d /usr/local/lib/libopencl-clang2.so.15*   . 
202+     echo  " Download IGC dev git hash $IGC_DEV_VER " 
203+     #  # Ensure we're in a writable directory for backup operations
204+     #  BACKUP_DIR="/tmp/igc-backup"
205+     #  mkdir -p "$BACKUP_DIR"
206+     #  cd "$BACKUP_DIR"
207+     #  echo "Working in backup directory: $BACKUP_DIR"
217208
218-     #  Ensure we're in a writable directory for backup operations
219-     BACKUP_DIR=" /tmp/igc-backup" 
220-     mkdir -p " $BACKUP_DIR " 
221-     cd  " $BACKUP_DIR " 
222-     echo  " Working in backup directory: $BACKUP_DIR " 
223-     
224-     if  ls /usr/local/lib/libopencl-clang2.so.15*  1>  /dev/null 2>&1 ;  then 
225-       cp -d /usr/local/lib/libopencl-clang2.so.15*   . 
226-       LIBOPENCL_BACKED_UP=true
227-       echo  " Successfully backed up libopencl-clang files" 
228-     else 
229-       echo  " Warning: libopencl-clang2.so.15* not found, skipping backup" 
230-       LIBOPENCL_BACKED_UP=false
231-     fi 
209+     #  if ls /usr/local/lib/libopencl-clang2.so.15* 1> /dev/null 2>&1; then
210+     #    cp -d /usr/local/lib/libopencl-clang2.so.15*  .
211+     #    LIBOPENCL_BACKED_UP=true
212+     #    echo "Successfully backed up libopencl-clang files"
213+     #  else
214+     #    echo "Warning: libopencl-clang2.so.15* not found, skipping backup"
215+     #    LIBOPENCL_BACKED_UP=false
216+     #  fi
232217    get_pre_release_igfx $IGC_DEV_URL  $IGC_DEV_VER 
233218    echo  " Install IGC dev git hash $IGC_DEV_VER " 
234219    #  New dev IGC packaged iga64 conflicting with iga64 from intel-igc-media
235220    #  force overwrite to workaround it first.
236-     if  ls * .deb 1>  /dev/null 2>&1 ;  then 
237-       dpkg -i --force-all * .deb
238-     fi 
239-     if  [ " $LIBOPENCL_BACKED_UP "   ==  " true"   ];  then 
240-       echo  " Install libopencl-clang" 
241-       #  Workaround only, will download deb and install with dpkg once fixed.
242-       echo  " Copying backed up libopencl-clang files from $BACKUP_DIR " 
243-       cp -d " $BACKUP_DIR "  /libopencl-clang2.so.15*   /usr/local/lib/
244-     fi 
245-     if  [ -f  /usr/local/lib/libigc.so.2 ];  then 
246-       rm -f /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1*  &&  \
247-          ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so &&  \
248-          ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
249-     fi 
221+     #  if ls *.deb 1> /dev/null 2>&1; then
222+     #    dpkg -i --force-all *.deb
223+     #  fi
224+     #  if [ "$LIBOPENCL_BACKED_UP" == "true" ]; then
225+     #    echo "Install libopencl-clang"
226+     #    # Workaround only, will download deb and install with dpkg once fixed.
227+     #    echo "Copying backed up libopencl-clang files from $BACKUP_DIR"
228+     #    cp -d "$BACKUP_DIR"/libopencl-clang2.so.15*  /usr/local/lib/
229+     #  fi
230+     #  if [ -f /usr/local/lib/libigc.so.2 ]; then
231+     #    rm -f /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1* && \
232+     #       ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so && \
233+     #       ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
234+     #  fi
235+     dpkg -i --force-all * .deb
236+     echo  " Install libopencl-clang" 
237+     #  Workaround only, will download deb and install with dpkg once fixed.
238+     cp -d libopencl-clang2.so.15*   /usr/local/lib/
239+     rm /usr/local/lib/libigc.so /usr/local/lib/libigc.so.1*  &&  \
240+        ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so &&  \
241+        ln -s /usr/local/lib/libigc.so.2 /usr/local/lib/libigc.so.1
250242    echo  " Clean up" 
251-     if  ls * .deb 1>  /dev/null 2>&1 ;  then 
252-       rm * .deb
253-     fi 
243+     rm * .deb libopencl-clang2.so.15* 
254244    echo  " $IGC_DEV_TAG "   >  /usr/local/lib/igc/IGCTAG.txt
245+     #  if ls *.deb 1> /dev/null 2>&1; then
246+     #    rm *.deb
247+     #  fi
248+     #  echo "$IGC_DEV_TAG" > /usr/local/lib/igc/IGCTAG.txt
255249
256-     #  Clean up backup directory (this also removes the backed up libopencl-clang files)
257-     if  [ -d  " $BACKUP_DIR "   ];  then 
258-       echo  " Cleaning up backup directory: $BACKUP_DIR " 
259-       rm -rf " $BACKUP_DIR " 
260-     fi 
250+     #  #  Clean up backup directory (this also removes the backed up libopencl-clang files)
251+     #   if [ -d "$BACKUP_DIR" ]; then
252+     #     echo "Cleaning up backup directory: $BACKUP_DIR"
253+     #     rm -rf "$BACKUP_DIR"
254+     #   fi
261255  fi 
262256}
263257
0 commit comments