Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create listreqs bash/shell script #2

Merged
merged 2 commits into from
Oct 11, 2021
Merged

Conversation

Mr-Destructive
Copy link
Contributor

@Mr-Destructive Mr-Destructive commented Oct 11, 2021

Addressing the Issue #1

Added a shell script that converts an requirements.txt file from a list format to a freeze format that can be in a downloadable format for pip.

Below is a quick demonstration.

libreqs1

Usage:

  1. Can pass in as a positional(command line) argument:
bash listreqs.sh reqs.txt
  1. Can input the file name from the prompt after running the shell script
bash listreqs.sh
Enter the requirements file name : reqs.txt
  1. Not passing any input will lead to the creation of a default file called requirements.txt.
bash listreqs.sh
Enter the requirements file name : 

@soumya997
Copy link
Owner

Its LGTM, just one thing though
As mentioned in the issue to perform both the steps pip list > reqs.txt and python script into a single step, for doing that I guess you need to add the pip list > reqs.txt inside the shell script that you have written.

Rest is great. Thank you.

@soumya997
Copy link
Owner

@Mr-Destructive can you please check, if the code is running or not, its not running for me.
sed: can't read requirements.txt: No such file or directory

@Mr-Destructive
Copy link
Contributor Author

What were the inputs for the script?

@soumya997
Copy link
Owner

It was showing Enter the requirements file name : so I gave a name for the file like requirements.txt. Thats the input.

@soumya997
Copy link
Owner

And also even if I create the file and then give the created file name as the input . It does not throw any error but the after running the shell script the created file is empty.

@Mr-Destructive
Copy link
Contributor Author

Mr-Destructive commented Oct 11, 2021

Is it now fine? I assumed the file was already created. Thanks for the feedback 👍

@soumya997 soumya997 merged commit 8769d13 into soumya997:main Oct 11, 2021
@soumya997
Copy link
Owner

Thanks Merged😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants