code: public void createShareLib() {
  
          if (!oozieShareLibCreate) {
              LOG.info("OOZIE: Share Lib Create Disabled... skipping");
          } else {
  
              final String fullOozieTarFilePath = shareLibCacheDir + Path.SEPARATOR + getOozieTarFileName();
  
              try {
  
                  // Get and extract the oozie release
                  getOozieTarFileFromRepo();
                  String oozieExtractTempDir = extractOozieTarFileToTempDir(new File(fullOozieTarFilePath));
  
                  // Extract the sharelib tarball to a temp dir
                  String fullOozieShareLibTarFilePath = oozieExtractTempDir + Path.SEPARATOR +
                          "oozie-" + getOozieVersionFromOozieTarFileName() + Path.SEPARATOR +
                          "oozie-sharelib-" + getOozieVersionFromOozieTarFileName() + ".tar.gz";
                  String oozieShareLibExtractTempDir = extractOozieShareLibTarFileToTempDir(
                          new File(fullOozieShareLibTarFilePath));
  
                  // Copy the sharelib into HDFS
                  Path destPath = new Path(oozieHdfsShareLibDir + Path.SEPARATOR + "oozie" + Path.SEPARATOR +
                          SHARE_LIB_PREFIX + getTimestampDirectory());
                  LOG.info("OOZIE: Writing share lib contents to: {}", destPath);
                  hdfsFileSystem.copyFromLocalFile(false, new Path(new File(oozieShareLibExtractTempDir).toURI()), destPath);
  
                  if (purgeLocalShareLibCache) {
                      FileUtils.deleteDirectory(new File(shareLibCacheDir));
                  }
  
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }
docs: Main driver that downloads, extracts, and deploys the oozie sharelib