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
alias gradle="_gradlew-or-gradle" | |
function _gradlew-or-gradle() { | |
CURRENT_DIR="$PWD" | |
until [ -f "./gradlew" ] || [ "$PWD" = "$TEMP_PWD" ]; do TEMP_PWD=$PWD; cd ..; done | |
if [[ -f "./gradlew" ]]; then | |
if [[ ! -f "./gradle/wrapper/gradle-wrapper.jar" ]]; then | |
echo "Could not find project wrapper jar for checksum validation!" | |
echo "Please run ./gradlew manually if you are sure of it!" |
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
public class UnixSystemNameless { | |
public static void main(String[] args) { | |
final var unixSystem = new com.sun.security.auth.module.UnixSystem(); | |
System.out.printf("username: %s%n", unixSystem.getUsername()); | |
System.out.printf("uid: %d%n", unixSystem.getUid()); | |
System.out.printf("gid: %d%n", unixSystem.getGid()); | |
System.out.printf("groups: %s%n", java.util.Arrays.toString(unixSystem.getGroups())); | |
} |