-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ailin Nemui
committed
Jan 30, 2024
1 parent
9dfa2fb
commit ef03dbf
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/zsh | ||
|
||
mkdir -p pipreqs_scan | ||
|
||
. ./_testing/_get_files_arr.zsh | ||
|
||
echo -n ... >&2 | ||
|
||
rfl=() | ||
for fn ($filelist) { | ||
if [[ -f $fn ]] { | ||
rfl+=$fn | ||
} | ||
} | ||
if [[ ${#rfl} -gt 0 ]] { | ||
ln -rst pipreqs_scan $rfl | ||
} | ||
pipreqs pipreqs_scan | ||
|
||
typeset -A broken_mods | ||
broken_mods=($(perl -MYAML::Tiny=LoadFile -e'print "$_ 1 " for @{LoadFile(+shift)->{pip}{broken_modules}}' _testing/config.yml)) | ||
|
||
typeset -a sed_del_broken | ||
for mod (${(k)broken_mods}) { sed_del_broken+=(-e '/^'"$mod"'=/d') } | ||
|
||
sed -i \ | ||
$sed_del_broken \ | ||
pipreqs_scan/requirements.txt | ||
|
||
exit 0 | ||
# vim:set sw=4 et: |