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

Fix for php 8.1.2 / Ubuntu 22.04 #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make the script runnable under Ubuntu 22.04.
hjtappe committed Dec 27, 2022
commit 0199632c723f864dca32ebfa313e958fb0c948ad
6 changes: 3 additions & 3 deletions vcfconvert.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env php -qC
#!/usr/bin/env -S php -q -C
<?php

/*
@@ -36,7 +36,7 @@ function get_args()
for ($j=1; $j < strlen($arg); $j++)
{
$key = $arg[$j];
$value = $_SERVER['argv'][$i+1]{0} != '-' ? preg_replace(array('/^["\']/', '/["\']$/'), '', $_SERVER['argv'][++$i]) : true;
$value = $_SERVER['argv'][$i+1][0] != '-' ? preg_replace(array('/^["\']/', '/["\']$/'), '', $_SERVER['argv'][++$i]) : true;
$args[$key] = $value;
}
}
@@ -67,7 +67,7 @@ Usage: vcfconvert.sh [-hilmpv] [-d delimiter] [-c utf-8] [-b identifier] [-o out
EOF;

// show help
if ($opt[0] == 'help')
if (count($opt) === 0 || $opt[0] == 'help')
die($usage);

// read arguments