-
Notifications
You must be signed in to change notification settings - Fork 189
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
feat: Add iOS, macOS, and BSD native support #251
base: master
Are you sure you want to change the base?
Conversation
a5290a4
to
bffe2be
Compare
bffe2be
to
0c8bc90
Compare
Are you running apt-fast on one of those systems? |
Yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool stuff and thank you for the provided fix. Is shlock available on your system as well? Reading the documentation this might be the natural replacement for flock.
@@ -247,7 +254,11 @@ _create_lock() | |||
# unlock and remove the lock file | |||
_remove_lock() | |||
{ | |||
flock -u "$LCK_FD" 2>/dev/null | |||
if [ $KERNEL = 'Linux' ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ $KERNEL = 'Linux' ]; then | |
if [[ "$KERNEL" == 'Linux' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion's not POSIX compliant afaict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apt-fast uses some non-posix functionality (already isn´t posix compliant).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, but I don't really understand how this provides any benefits (I don't use bash and other posix shells normally/willingly).
Co-authored-by: Dominique Lasserre <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look into shlock.
@@ -247,7 +254,11 @@ _create_lock() | |||
# unlock and remove the lock file | |||
_remove_lock() | |||
{ | |||
flock -u "$LCK_FD" 2>/dev/null | |||
if [ $KERNEL = 'Linux' ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion's not POSIX compliant afaict.
The only thing I'll mention's that root users can delete the lockfile when |
I used this on a rootfully jailbroken iOS device. There are some differences with the paths in the documentation for Darwin based kernels that I had to resolve, but this at least makes it work.