LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   mkdir ../binutils-build gives me "Permission Denied"!!! (https://www.linuxquestions.org/questions/linux-from-scratch-13/mkdir-binutils-build-gives-me-permission-denied-329012/)

satimis 06-29-2005 06:51 AM

Hi freegianghu,

Tks for your script.

Quote:

To delete all extracted directories, run script like:
Code:

for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done


I suppose it is a bash script. The script will look like
Code:

#!/bin/bash
for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done

and save it to
/mnt/lfs/home/abc.sh

Not on the Host FC3.

Then
chmod +x abc.sh

Leave all package-tarballs and patches in $LFS/sources. If I'm wrong please correct me.

TIA

B.R.
satimis

freegianghu 06-29-2005 07:00 AM

Quote:

Originally posted by satimis
Hi freegianghu,

Tks for your script.

I suppose it is a bash script. The script will look like
Code:

#!/bin/bash

for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done

and save it to
/mnt/lfs/home/abc.sh

Not on the Host FC3.

Then
chmod +x abc.sh

Leave all package-tarballs and patches in $LFS/sources. If I'm wrong please correct me.

TIA

B.R.
satimis

You are right!!! You must be sure that you are in $LFS/sources before running this script.
Code:

#!/bin/bash

cd $LFS/sources &&
{
  for input in `ls` ; do
    if [ -d $input ]; then
      echo "Removing $input" && rm -rf $input
    fi
  done
}

Cheers,
GH


All times are GMT -5. The time now is 09:53 PM.