Skip to content

Commit 9ae952a

Browse files
giordanostaticfloat
authored andcommitted
Add flag to auto_install_license to check success (#346)
1 parent 2aff6fb commit 9ae952a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

0_RootFS/Rootfs/bundled/conf/profile.d/license_utils.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,14 @@ auto_install_license () {
3737
fi
3838
fi
3939
fi
40-
}
4140

41+
if [[ "${@}" == "-c" ]]; then
42+
if [[ -d "${prefix}/share/licenses/${SRC_NAME}" ]]; then
43+
# If we pass the `-c` option, check if we installed anything,
44+
# if not then return non-zero exit code.
45+
return 0
46+
else
47+
return 1
48+
fi
49+
fi
50+
}

0 commit comments

Comments
 (0)